문제

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