3 ms·
Ha, I know the feeling. Rich & I started with the workers implementation back in 2015. No console errors ;) What was a huge help is the remotes API (remote met
by tobiu 6y ago
Ha, I know the feeling. Rich & I started with the workers implementation back in 2015. No console errors ;)
What was a huge help is the remotes API (remote method access).
example:
https://github.com/neomjs/neo/blob/dev/src/main/addon/Stylesheet.mjs#L25 https://github.com/neomjs/neo/blob/dev/src/main/addon/Styles...
createStyleSheet() is defined inside this class which (optionally) runs inside the main thread and is exposed as a remote method to the App worker.
Now, when you are working inside the App worker scope, you can simply use it as a promise:
Neo.main.addons.Stylesheet.createStyleSheet(opts).then(data) {
// do something
}