Closed
Bug 253670
Opened 21 years ago
Closed 21 years ago
Unable to access HTML Document from SVG Document
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: radha.k, Assigned: alex)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a3) Gecko/20040725
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a3) Gecko/20040725
I have embedded SVG in HTML using <embed name="e1" src="sample.svg">
In sample.svg file,there is onLoad event defined .
<svg id="SVG1' onload="onLoad(evt) ">
<script type="text/ecmascript" xlink:href="f1.js"> </script></svg>
In f1.js file, I used 'evt.target.getOwnerDocument' method to access SVGDocument
refernce.
But no method is available to access HTML Document object from SVG Document.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1•21 years ago
|
||
I still think that all Document objects should implement (or be castable to) all
the various Document types. It doesn't make sense to limit the Document to what
the root namespace (or worse, the MIME type) happens to be, especially in a
world of compound documents and mixed namespaces.
Comment 2•21 years ago
|
||
Ian, I think you misunderstood comment 0. As I understand, reporter is trying
to get at the ownerDocument of the <embed> from code running in the document
loaded by the <embed>.
This can in fact be done by using the window.parent chain, no?
Comment 3•21 years ago
|
||
Oh, indeed, my bad.
Yeah, the event target should be the <svg> element, no the embed, so it is
correct that you wouldn't get to the owner doc that way. window.parent seems to
be the right chain.
INVALID?
Comment 4•21 years ago
|
||
Marking INVALID.
I'm surprised you managed to conduct this test Radha since <embed> can't be used
for SVG content (see bug 240408).
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•