-
Notifications
You must be signed in to change notification settings - Fork 35
Can't call functions of classes derived from built-in classes #113
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
Comments
I looked into this and can confirm the base prototype is being used and not the extended prototype. |
I believe this issue has been fixed with the release of version 0.3.0, which is now on npm. Thank you for reporting it! |
so happy to hear that, I'm going to try it out! |
Uh oh!
There was an error while loading. Please reload this page.
Consider the following code that works as expected:
When you try to do the same thing by extending builtins:
Look at the logs relating to
bar
andbaz
(marked with asterisks above). You can see that the two methods (bar
method andbaz
getter) added through the class definition are added to the prototype but have undefined values. Note that the property added in the constructor (foo
) does work, however.The same problem happens whether we are extending
Request
,Response
,Headers
,URL
,URLSearchParams
, etc. so I believe it is just for the builtins, and I believe it's a bug.The text was updated successfully, but these errors were encountered: