<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>39699</bug_id>
          
          <creation_ts>2010-05-25 16:36:08 -0700</creation_ts>
          <short_desc>Implement DOM Level 3 Node::getUserData/setUserData</short_desc>
          <delta_ts>2023-08-26 01:08:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="kangax">kangax</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>bugzilla+webkit</cc>
    
    <cc>cdumez</cc>
    
    <cc>john.david.dalton</cc>
    
    <cc>oliver</cc>
    
    <cc>sam</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>230523</commentid>
    <comment_count>0</comment_count>
    <who name="kangax">kangax</who>
    <bug_when>2010-05-25 16:36:08 -0700</bug_when>
    <thetext>DOM Level 3 is currently draft, but `Node::getUserData` (http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-getUserData )/`Node::setUserData` (http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-setUserData ) are already implemented in Mozilla and are a convenient way to store user data for node (instead of assigning expandos).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>307929</commentid>
    <comment_count>1</comment_count>
    <who name="Sam Weinig">sam</who>
    <bug_when>2010-11-11 08:05:51 -0800</bug_when>
    <thetext>How does using userData differ from using expandos?  Why would one want to use use it rather than an expando?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>307937</commentid>
    <comment_count>2</comment_count>
    <who name="kangax">kangax</who>
    <bug_when>2010-11-11 08:22:08 -0800</bug_when>
    <thetext>The problem with expandos is collisions with members of any interfaces implemented by a node in question. How can you have a data under a key of &quot;nodeName&quot;, &quot;appendChild&quot;, etc. In implementations that make DOM objects inherit from Object.prototype or Function.prototype (such as webkit) there&apos;s additional set of candidates for collisions (toString, constructor, call, etc.).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>307945</commentid>
    <comment_count>3</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2010-11-11 08:31:41 -0800</bug_when>
    <thetext>If the problem is collisions we should do something much simpler than UserData imo. (Note that UserData is tentatively removed from Web DOM Core.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>307952</commentid>
    <comment_count>4</comment_count>
    <who name="kangax">kangax</who>
    <bug_when>2010-11-11 08:59:00 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; If the problem is collisions we should do something much simpler than UserData imo. (Note that UserData is tentatively removed from Web DOM Core.)

Ok. But simpler how? I can imagine something like `Node::userData` (shorter name + no function call) where `userData` would need to be explicitly specified to have [[Prototype]] of null.

Or did you mean something else?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>307965</commentid>
    <comment_count>5</comment_count>
    <who name="John-David Dalton">john.david.dalton</who>
    <bug_when>2010-11-11 09:31:53 -0800</bug_when>
    <thetext>I know there are also issues with expando&apos;s and cloneNode() in IE (IE copies non-object value expandos to the clone, and also issues with some Java Applets barfing when devs attempt to set expando&apos;s on them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1503000</commentid>
    <comment_count>6</comment_count>
    <who name="Lucas Forschler">lforschler</who>
    <bug_when>2019-02-06 09:03:36 -0800</bug_when>
    <thetext>Mass moving XML DOM bugs to the &quot;DOM&quot; Component.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1973758</commentid>
    <comment_count>7</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2023-08-26 01:08:50 -0700</bug_when>
    <thetext>This feature is no longer standardized. The alternative is using WeakMap.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>