Module Use

Use HTML Widget As A Module

Follow these steps to use HTML Widget as a module:

  1. Copy the regular file and paste it into a new scriptable script

  2. Rename the script to html-widget

  3. Create a new script and paste const htmlWidget = importModule("html-widget") at the top of the file

  4. Start to create the widget as you would normally in the newest script

const htmlWidget = importModule("html-widget")
let widget = await htmlWidget(`
<widget>
</widget>
`)

Last updated