سؤال

I'm starting with JavaScript and the Rhino engine. I know the ECMAScript 262 specification. I need to know what features, e.g. functions/objects/etc are defined by the Rhino JavaScript engine beyond the ECMA standard. Most examples just feature print, Packages and import* but I wasn't able to find an exhaustive list.

هل كانت مفيدة؟

المحلول

See predefined properties here: https://developer.mozilla.org/en/Rhino_Shell#Predefined_Properties

This is generally the best page about Rhino and it's JS features: https://developer.mozilla.org/en/Rhino_Shell

نصائح أخرى

This isn't an exhaustive list but I have a compat table of non-standard ES features. Take a look at Rhino column — http://kangax.github.com/es5-compat-table/non-standard/.

Note how Rhino's feature set is pretty close to that of SpiderMonkey (latest JS engine in Firefox). There are differences though. For example, Rhino doesn't have "caller" property on functions, unlike SpiderMonkey. Rhino supports e4x but not expression closures. It looks more or less like a subset of SpiderMonkey, although there might be non-standard features that I'm not aware of (in which case I'd love to add them to the table).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top