📱
HTML Widget
  • HTML Widget
  • Getting Started
    • Regular Use
    • Module Use
  • About
    • The Function
    • Types
  • Components
    • <widget>
    • <stack>
    • <spacer>
    • <img>
    • <text>
    • <date>
    • <style>
    • <!-- Comment -->
  • Add-ons
    • Add-ons
    • <symbol>
    • <hr>
    • <progress>
    • <blockquote>
  • Template
    • Templates
    • Mapping
    • Render
  • Examples
    • Hello, World!
    • Reddit Widget
  • Closing Remarks
    • Bug Fixes and Feedback
    • Support
Powered by GitBook
On this page
  1. Getting Started

Module Use

Use HTML Widget As A Module

PreviousRegular UseNextThe Function

Last updated 1 year ago

Follow these steps to use HTML Widget as a module:

  1. Copy the 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>
`)
regular