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 140575
154458
All DOM descriptors are completely useless
https://bugs.webkit.org/show_bug.cgi?id=154458
Summary
All DOM descriptors are completely useless
Andrea Giammarchi
Reported
2016-02-19 09:29:44 PST
It is currently basically impossible to patch or polyfill anything in the DOM world in WebKit. For instance, writing this snippet produce an unexpected result: ```js Object.getOwnPropertyDescriptor(Element.prototype, 'id'); {get: undefined, set: undefined, enumerable: true, configurable: false} = $1 ``` Accessors are all flagged as non configurable, and the worst part is that it's not possible to use them with custom elements or any other sort of element because getters and setters are unreachable (being undefined). This makes patching HTMLAnchorElement and URL impossible in a polyfill like the following one:
https://github.com/WebReflection/url-search-params#url-search-params
so my only option would be to eventually fully replace the whole URL object (also why is every constructor with a prototype an object instead of a function I don't get it) which is way more obtrusive approach. Bear in mind that polyfill already works with many other browsers, but I'll just push a version that gives up on WebKit which is quite sad because I love this browser. Thanks for considering fixing this. Best Regards
Attachments
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2016-02-19 19:14:51 PST
This has been fixed in
Bug 140575
. It should work fine in a recent WebKit nightly build:
https://nightly.webkit.org
If issues remain, please let me know. *** This bug has been marked as a duplicate of
bug 140575
***
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