-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
I'm putting this here for documentation as much as anything. It's not clear to me if Mozilla Rhino will ever be made ECMAscript 6 compliant or be kept up to date in general...
I've found that using therubyrhino in a rails 4.2 application on JRuby that rake assets:precompile
will fail even though my javascript executes without error in the browser.
This appears to be because Mozilla Rhino is only JS 1.7 compliant, whereas my browser can execute v6.
E.g.:
jirb
irb(main):001:0> require 'rhino'
=> true
irb(main):002:0> eval_js "7 * 6"
=> 42
irb(main):003:0> eval_js "var a = 1"
=> nil
irb(main):004:0> eval_js "let a = 1"
Rhino::JSError: missing ; before statement
Not sure if the solution is to have JRuby move to another Java JS engine (are there any?) or somehow make rake assets:precompile
not do syntax checking, or get Mozilla Rhino updated.
donv
Metadata
Metadata
Assignees
Labels
No labels