Re: Notes on implementing non-local URI references and resource documents

On Wed, 15 Oct 2008 06:08:31 +0200, Robert O'Callahan <robert@ocallahan.org> wrote:

> On Wed, Oct 15, 2008 at 1:00 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>
>>
>> Opera currently allows cross-domain references in svg, but applies
>>> restrictions on trying to access the DOM of those documents, similar to how
>>> <iframe> is handled.
>>>
>>
>> I don't believe the SVG specification has any way of accessing the DOM of
>> resource documents to start with, so it sounds like we're not talking about
>> the same thing here.
>
>
> There actually is one way: nodes created by <use> should implement
> SVGElementInstance, whose 'correspondingElement' property gives you a
> reference to the DOM node in the resource document.
> http://www.w3.org/TR/SVG/struct.html#InterfaceSVGElementInstance
> Maybe that's what Erik was talking about.

Right. While the other resource types such as masks, filters, paintservers and clip-paths don't offer ways of actually accessing the resource document it's enough with a use element to gain access to the resource document. However, like I wrote before Opera does not allow DOM modifications/access for cross-origin use elements.

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed

Received on Wednesday, 15 October 2008 06:40:39 UTC