Re: [svg-developers] Re: any disadvantage to setting properties on DOM nodes?

2011-03-23 Thread Jacob Beard
Thanks for that. It seems like setting expando properties on DOM nodes is
not portable or safe. It's too bad, as it seems like this would be the
easiest way to associate a DOM node with some arbitrary JavaScript data.
This would be a really useful and appropriate technique when the data model
which you're concerned about is simply the SVG DOM.

It seems like data-* attributes are only intended to hold string data, and
it would not be possible to, for instance, store a reference to a JS object.

Does anyone know, how good is support for Node.setUserData?

Thanks,

Jake

On Wed, Mar 23, 2011 at 2:58 AM, t...@ymail.com t...@ymail.com wrote:



 --- In svg-developers@yahoogroups.com, Jacob Beard jbeard4@... wrote:
  Are there hidden
  complexities involved in using DOM nodes to store data that I should be
  aware of?
 

 As I learned it's not guaranteed an implementation will allow arbitrary
 data to be stored in DOM nodes:

 http://tech.groups.yahoo.com/group/svg-developers/message/63002

 Thomas W.

  



[Non-text portions of this message have been removed]





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/



Re: [svg-developers] Re: any disadvantage to setting properties on DOM nodes?

2011-03-23 Thread Jacob Beard
Hm, I'm just reading a bit more deeply here. It seems that all browser
implementations of SVG allow expando properties to be set on DOM nodes, and
it's only Batik that doesn't work. However, Cameron suggests a path to add
this functionality, and Thomas even points out that the Lobo browser already
supports this (it's probably not possible just to copy the code from Lobo to
Batik, though, due to the GPL licensing on Lobo).

So maybe this functionality should be interpreted as a de facto standard, as
it's supported by all of the browser implementations? It certainly seems to
me to be the most elegant approach to fulfilling my project's requirements.
I wonder if setting expandos on DOM nodes is also supported in the embedded
SVG implementations (assuming they support scripting with JavaScript).

What do you think?

Jake

On Wed, Mar 23, 2011 at 2:58 AM, t...@ymail.com t...@ymail.com wrote:



 --- In svg-developers@yahoogroups.com, Jacob Beard jbeard4@... wrote:
  Are there hidden
  complexities involved in using DOM nodes to store data that I should be
  aware of?
 

 As I learned it's not guaranteed an implementation will allow arbitrary
 data to be stored in DOM nodes:

 http://tech.groups.yahoo.com/group/svg-developers/message/63002

 Thomas W.

  



[Non-text portions of this message have been removed]





-
To unsubscribe send a message to: svg-developers-unsubscr...@yahoogroups.com
-or-
visit http://groups.yahoo.com/group/svg-developers and click edit my 
membership
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)

* To change settings via email:
svg-developers-dig...@yahoogroups.com 
svg-developers-fullfeatu...@yahoogroups.com

* To unsubscribe from this group, send an email to:
svg-developers-unsubscr...@yahoogroups.com

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/