Changes between Version 2 and Version 3 of Ticket #15892, comment 19


Ignore:
Timestamp:
Sep 11, 2012, 3:42:32 PM (8 years ago)
Author:
Colin Snover
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15892, comment 19

    v2 v3  
    1 You cannot use `lang.delegate` on an Event object to change a property which already exists. Event objects act like frozen objects in at least Firefox and Opera (probably IE9 too), and the rules of ![[CanPut]] in ES5 make it so the property will not be changed. The only way this works is if you use `Object.defineProperty` on the new delegate object. This is an ES5 spec requirement so future mobile browsers will work the same way unless the spec is changed (unlikely).
     1You cannot use `lang.delegate` on an Event object to change a property which already exists. The rules of ![[CanPut]] in ES5 make it so the property will not be changed. The only way this works is if you use `Object.defineProperty` on the new delegate object. As this is an ES5 + Web IDL spec requirement, future mobile browsers will work the same way unless the specs are changed (unlikely).