[Webkit-unassigned] [Bug 26127] New: __defineSetter__/__defineGetter__ is ignored on native properties

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 1 20:08:46 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=26127

           Summary: __defineSetter__/__defineGetter__ is ignored on native
                    properties
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore JavaScript
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: t.brain at gmail.com


When trying to attach a getter/setter to a native DOM property on an element,
the getter/setter seems to be ignored and is never called. The original
behavior is maintained.

Use this simple code testcase:

<div id="d"></div>
<script type="text/javascript">
var o=document.getElementById("d");

o.__defineSetter__("id",function () { alert("SET"); });

o.id="test";
</script>

Expected behavior: an alert saying "SET".
Actual behavior: nothing.

The same code works as expected in Firefox and Chrome.

Similarly, attaching the getter/setter on the prototype (for example, on
HTMLDivElement.prototype) fails on Safari and Chrome as well, but works as
expected in Firefox.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list