Manipulating the DOM of an SVG document

View: New views
5 Messages — Rating Filter:   Alert me  

Manipulating the DOM of an SVG document

by JeahJeah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This code does not display a square: http://pastebin.com/m4ba2d89c

Where am I going wrong?
_______________________________________________
dev-embedding mailing list
dev-embedding@...
https://lists.mozilla.org/listinfo/dev-embedding

Re: Manipulating the DOM of an SVG document

by Boris Zbarsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

JeahJeah wrote:
> This code does not display a square: http://pastebin.com/m4ba2d89c
>
> Where am I going wrong?

Using setAttributeNS.

-Boris
_______________________________________________
dev-embedding mailing list
dev-embedding@...
https://lists.mozilla.org/listinfo/dev-embedding

Re: Manipulating the DOM of an SVG document

by JeahJeah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Aug 24, 5:30 pm, Boris Zbarsky <bzbar...@...> wrote:
> JeahJeah wrote:
> > This code does not display a square:http://pastebin.com/m4ba2d89c
>
> > Where am I going wrong?
>
> Using setAttributeNS.
>
> -Boris

I am.
_______________________________________________
dev-embedding mailing list
dev-embedding@...
https://lists.mozilla.org/listinfo/dev-embedding

Re: Manipulating the DOM of an SVG document

by Boris Zbarsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

JeahJeah wrote:
> On Aug 24, 5:30 pm, Boris Zbarsky <bzbar...@...> wrote:
>> JeahJeah wrote:
>>> This code does not display a square:http://pastebin.com/m4ba2d89c
>>> Where am I going wrong?
>> Using setAttributeNS.
>>
>> -Boris
>
> I am.

Yes you are.  You shouldn't be.  SVG doesn't use any attributes in the
SVG namespace, just attributes in the XLink and null namespaces.

Might be worth reading up on XML's namespace-binding rules and how they
differ for elements and attributes.

-Boris
_______________________________________________
dev-embedding mailing list
dev-embedding@...
https://lists.mozilla.org/listinfo/dev-embedding

Re: Manipulating the DOM of an SVG document

by JeahJeah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Aug 24, 5:58 pm, Boris Zbarsky <bzbar...@...> wrote:

> JeahJeah wrote:
> > On Aug 24, 5:30 pm, Boris Zbarsky <bzbar...@...> wrote:
> >> JeahJeah wrote:
> >>> This code does not display a square:http://pastebin.com/m4ba2d89c
> >>> Where am I going wrong?
> >> Using setAttributeNS.
>
> >> -Boris
>
> > I am.
>
> Yes you are.  You shouldn't be.  SVG doesn't use any attributes in the
> SVG namespace, just attributes in the XLink and null namespaces.
>
> Might be worth reading up on XML's namespace-binding rules and how they
> differ for elements and attributes.
>
> -Boris

Ahhh, I miss read your reply.  Thanks man, that worked.
_______________________________________________
dev-embedding mailing list
dev-embedding@...
https://lists.mozilla.org/listinfo/dev-embedding