-
Notifications
You must be signed in to change notification settings - Fork 18
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
Rhino support #41
Comments
@termi Traceur has same issue: google/traceur-compiler#1200 |
@termi we can wrap |
@termi how I can help with this fix? |
Sorry for the long absence. I don't think it should be part of the transpiler, since it's an environment bug and you can wrap it by your self: var $Object_defineProperty = Object.defineProperty;
Object.defineProperty = function(obj, prop, desc) {
if ( prop === 'prototype' ) {
delete desc['writable'];
arguments[2] = desc;
}
return $Object_defineProperty.apply(this, arguments);
} But I will do an option for this in one of the future versions. Don't close this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I try to run compiled JS in Rhino, I get error:
It was generated because of:
Problem is that Rhino deby to replace
prototype
. But this code is unnecessary in Rhino, becauseMyClass.prototype
is already not writable.Rhino support is very important to me, because it allow to run JS code on Java (and languages like JRuby). It is a big market and fix is very small.
The text was updated successfully, but these errors were encountered: