-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ext/dom_exception): align better with spec #15097
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am very unsure about this usage of __proto__
, but it does seem to work. everything else looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use __proto__
.
The same effect can be achieved using Object.create.
This |
Interestingly, this was how it was originally written, but was undone... Reverted in c75f92c |
@phosra Thanks. This is not a performance sensitive path (it runs once during build of the Deno binary). As such we much prefer things like
|
Acknowledged, fair enough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now
Fixes #12927.
There were no issues open about the current implementation.
Uses symbolic members for
DOMException
, and applies branding to its getters.Uses a null prototype for the error string->code mapping object, to avoid prototype access.
Also updates outdated specification links.