Closed JoaoLeiria closed 6 years ago
setInterval()
, setTimeout()
and setImmediate()
are not available in all environments, only in those that have an event loop. For example, they are not available in JavaScript server pages or servlets.
So @obiltschnig, I was running the code in a normal .js file. I believe the problem was that in the extensions.xml I had:
<extension point="com.appinf.osp.js" script="start.js"/>
and not:
<extension point="com.appinf.osp.js" script="start.js" schedule="@start" />
I'm still testing the changes.
@schedule
is ignored for com.appinf.osp.js
extension point. It's only valid for the com.appinf.osp.js.schedule
extension point. In either case, setTimeout()
, etc should work. Try creating a script in the Sandbox, then export the bundle from there.
Hello everyone,
In a bundle, the first function that runs, has a setInterval in it. Pretty straightforward, I thought . But I'm getting a:
For what it's worth, for setTimeout, it's the same behaviour. How is this possible?
Best regards, João