viraljilo.blogg.se

Playon plugins
Playon plugins













playon plugins

a fixed number of nodes, or for a few milliseconds), then yield to the main thread before continuing. The idea is to only do a little bit of computation (e.g. The best way to keep the UI responsive is to split your work into chunks.

playon plugins

Here are different ways you can potentially deal with this: In exchange for a more simple API, we can't prevent plugins from freezing the UI. But it's one of the tradeoffs we had to make to let your plugin run on the JavaScript main thread. It's not the best experience for the user if the UI is completely frozen while the plugin finishes. Users create really large Figma documents! This could be for example, a plugin that applies some complex filter on an image, or a plugin that touches every node in a document. Sometimes, your plugin might be frozen not because it has a bug, but because it's genuinely doing an operation that takes a long time.

playon plugins

My plugin needs to do a long-running task. If you have the developer tools open, can push the ‘pause’ button (in the ‘Sources’ tab) to see why your script is in an infinite loop. You have to close and reopen the hanging editor tab and restart your plugin. You will be unable to click the “Cancel” button because the editor tab will be hung waiting for your plugin to end. Frozen Plugins I accidentally caused an infinite loop.















Playon plugins