- From: Cameron McCormack <cam@mcc.id.au>
- Date: Tue, 12 Aug 2014 16:59:52 +1000
- To: "www-svg@w3.org" <www-svg@w3.org>
I took ACTION-3611 to write a polyfill that implements the new SVG DOM
proposal I made in http://dev.w3.org/SVG/proposals/improving-svg-dom/.
Here's an initial version of that:
https://github.com/heycam/new-svg-dom
Apologies for not getting it out with more time before the F2F.
I have added a couple of examples to the repo:
* examples/moving-rects-{0,1,2,3}.html
These show how some simple manipulation of length-typed attributes
would be done:
#0 is using the current SVG DOM
#1 is using the proposal where length-typed attributes are
reflected as strings
#2 is using the proposal where they are reflected as numbers
#3 is using the proposal where they are reflected as values that
on getting return a number, but allow assignment of a number
of a string
#4 is using the proposal where you have parallel properties
for the string and number accessors (rect.x and rect.x_px,
I've named them)
* examples/moving-polyline-{0,1}.html
These show manipulation of the points="" attribute of a <polyline>:
#0 is using the current SVG DOM
#1 is using the proposed SVG DOM
I will see if I get time to add more examples. Please give the script a
go to inform our discussions at the F2F next week. If you would like me
to construct an example illustrating a particular aspect of the
proposal, let me know.
Thanks,
Cameron
Received on Tuesday, 12 August 2014 07:00:39 UTC