WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 49739
18737
__lookupSetter__ and __lookupGetter__ don't work for getting native setters and getters
https://bugs.webkit.org/show_bug.cgi?id=18737
Summary
__lookupSetter__ and __lookupGetter__ don't work for getting native setters a...
Michael A. Puls II
Reported
2008-04-25 01:12:46 PDT
Safari 3.1 (525.13) with WebKit-SVN-
r32486
. Getting native setters and getters works in Firefox.
Attachments
Example that works in Opera 9.5 and Firefox 3, but not in Safari with latest webkit
(3.22 KB, text/html)
2008-07-24 09:49 PDT
,
Michael A. Puls II
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Michael A. Puls II
Comment 1
2008-04-25 23:05:54 PDT
It doesn't work on instances either. javascript:alert(document.createAttribute("instance").__lookupGetter__("value")) That works in FF and Opera 9.5.
Sam Weinig
Comment 2
2008-06-16 13:49:03 PDT
The reason this does not work is that value is a not a getter/setter, but rather an attribute. It is an implementation detail that Firefox implements native attributes as getter/setter functions. Changing our implementation to do this would be a probable performance hit, so I can only really see doing this if there is a real world need.
Michael A. Puls II
Comment 3
2008-06-17 03:57:46 PDT
(In reply to
comment #2
)
> The reason this does not work is that value is a not a getter/setter, but > rather an attribute. It is an implementation detail that Firefox implements > native attributes as getter/setter functions. Changing our implementation to > do this would be a probable performance hit, so I can only really see doing > this if there is a real world need. >
Would making it work for instances be acceptable, or would that be just as much as a performance concern?
Michael A. Puls II
Comment 4
2008-07-24 09:49:09 PDT
Created
attachment 22467
[details]
Example that works in Opera 9.5 and Firefox 3, but not in Safari with latest webkit (In reply to
comment #2
)
> so I can only really see doing > this if there is a real world need.
See the source of the attachment for an example. If not, how bout just for compatibility with Firefox and Opera? Or, maybe try out the change and see how much performance is affected? (Maybe it'd be acceptable?)
Michael A. Puls II
Comment 5
2008-08-27 21:50:05 PDT
(In reply to
comment #1
)
> It doesn't work on instances either. > > javascript:alert(document.createAttribute("instance").__lookupGetter__("value")) > > That works in FF and Opera 9.5. >
This works in Opera 9.5+, Firefox and IE8 beta 2. javascript:alert(document.createTextNode("instance").__lookupGetter__("nodeValue"))
Alexey Proskuryakov
Comment 6
2009-06-04 07:27:12 PDT
See also:
bug 12721
.
Gavin Barraclough
Comment 7
2012-03-07 00:10:12 PST
The problem here isn't that __lookupGetter__/Setter are doing the wrong thing, the problem is that the properties aren't actually accessors (but per the WebIDL spec should be). *** This bug has been marked as a duplicate of
bug 49739
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug