-
Notifications
You must be signed in to change notification settings - Fork 20
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/RingoJS compatibility fix for lacking __proto__ feature / Object.setPrototypeOf polyfill #51
base: master
Are you sure you want to change the base?
Conversation
…lue of callback like it should
…ing "lazy" flag on source to false
I had a few questions about this: |
I did not check whether there was a way to enable the proto feature since I assumed it is considered deprecated. I saw the comment in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/setPrototypeOf#Notes and thought it would be good to use Object.setProtoypeOf. Maybe there is a way to re-enable the proto feature in Rhino (http://www-archive.mozilla.org/rhino/apidocs/org/mozilla/javascript/Context.html#FEATURE_PARENT_PROTO_PROPERTIES) but I have no idea how easy it is to run ringojs with this flag enabled. This post was helpful: http://stackoverflow.com/questions/10476560/proto-when-will-it-be-gone-alternatives To be honest I skipped some of the comments, so maybe there is a better way to do the same thing. There is no reason to call it ringojs-compat, it just seemed right at the time and I didn't know where else to put it. Of course I should do an early test of proto, thanks! I will commit the changes some time this week. I currently have no CLA, maybe I should do that, haven't thought of that. Sorry if I caused any troubles and please feel free to ignore the whole thing if you'd like to solve it differently... Maybe you could tell me where else in the persevere stack the proto feature is used. Would help me a lot. |
I agree that patching proto with a more standard function is a worthwhile upgrade. The proto property is used in Pintura in jsgi/metadata.js and facet/jsgi.js. It would be pretty trivial to require the patch module in those modules, I could certainly add that. Also, BTW, here is the Dojo CLA (we want this for any significant patches to keep the codebase clean): http://dojofoundation.org/about/cla |
Thanks for writing this Shim btw! |
No description provided.