Dear all, I have something like this:
<html... >
<embed ...>
</html>
Am I out of luck if I wanted to access the embedded DOM and manipulate its
content?
Or if I have:
<svg ...>
<svg ...>
...
</svg ...>
</svg>
Is it possible to manipulate the inner svg elements from a script defined in
the outer? I tried
var SVGDoc = evt.getTarget() .getOwnerDocume nt();
var SVGRoot = SVGDoc.getDocum entElement();
var SVGInner = SVGDoc.getEleme ntsByTagName("s vg");
SVGInner.curren tTranslate.x += dx;
and it won't work, if I did:
var SVGDoc = evt.getTarget() .getOwnerDocume nt();
var SVGRoot = SVGDoc.getDocum entElement();
SVGRoot.current Translate.x += dx;
then the entire outer document gets translated, I've also tried
SVGDoc.getEleme ntByID and getfirstChild with no luck... can someone point me
in the right direction?
Thanks, Jules
<html... >
<embed ...>
</html>
Am I out of luck if I wanted to access the embedded DOM and manipulate its
content?
Or if I have:
<svg ...>
<svg ...>
...
</svg ...>
</svg>
Is it possible to manipulate the inner svg elements from a script defined in
the outer? I tried
var SVGDoc = evt.getTarget() .getOwnerDocume nt();
var SVGRoot = SVGDoc.getDocum entElement();
var SVGInner = SVGDoc.getEleme ntsByTagName("s vg");
SVGInner.curren tTranslate.x += dx;
and it won't work, if I did:
var SVGDoc = evt.getTarget() .getOwnerDocume nt();
var SVGRoot = SVGDoc.getDocum entElement();
SVGRoot.current Translate.x += dx;
then the entire outer document gets translated, I've also tried
SVGDoc.getEleme ntByID and getfirstChild with no luck... can someone point me
in the right direction?
Thanks, Jules
Comment