"modern" JavaScript?

53 views
Skip to first unread message

Michael Bach

unread,
Nov 12, 2020, 4:07:40 AM11/12/20
to Cappuccino & Objective-J
Dear Cappuccino Colleagues:

One of the nice things in Cappuccino is that we can fall back to JavaScript where necessary. I note, though, that "modern" JavaScript does not work, e.g. "let", or "Promise". Is there a way around this? I could live with the current situation if this is sort of difficult :).

Thanks & best, Michael

Martin Carlberg

unread,
Nov 12, 2020, 7:05:59 AM11/12/20
to Cappuccino & Objective-J
Hi Michael,

We need to update our parser for this to work. And we need remove Rhino also as it will not understand it.

Rhino is almost completely removed so that is not that much work left but the parser will be more work. A good thing is that we can add feature by feature. For example add "const" and "let" first and continue with the rest later.

I think you can import a modern javascript file into a Cappuccino app with @import "MyFavoriteJavaScript.js". This file should just be executed when the app is loaded. I have not tested this for a long time so I'm nor sure if it still works.

- Martin

--
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/objectivej/5ce09aca-cb0a-4307-ba58-c980c5d213c3n%40googlegroups.com.

Prof. Michael Bach

unread,
Nov 12, 2020, 4:10:12 PM11/12/20
to objec...@googlegroups.com
Dear Martin:

> We need to update our parser for this to work. And we need remove Rhino also as it will not understand it. …

Thank you very much for this clear explanation.


Best, Michael
--
Prof. Michael Bach <https://michaelbach.de>

Reply all
Reply to author
Forward
0 new messages