Differences in using <iframe> and <embed> for displaying SVG and scripting

前端 未结 3 1085
自闭症患者
自闭症患者 2021-01-18 01:40

I\'m trying to create Dynamic SVG graphics, it is my understanding that the only way to create dynamic SVG is to use a scripting language, so I have a few questions, basical

3条回答
  •  [愿得一人]
    2021-01-18 02:46

    Whats the difference (in terms of scripting) in using an or and tag for accessing the SVG elements?, maybe someone can include simple examples.

    :

    Example (view source): https://jwatt.org/svg/demos/scripting-across-embed.html

    (both methods fail at least in Chromium)

    Example (view source): https://jwatt.org/svg/demos/scripting-across-object.html


    Can SVG evaluate math expressions in element attributes(just to be sure)?

    like ?

    I did't find a word about it in SVG spec.


    EDIT

    Personally, I recommend to use + Data URI Scheme and/or object_element.contentDocument. I've tested both in Chromium and Firefox.

    AHA! has similar security behavior to