Import

Imports can be used to load external JavaScript. While seemingly simple, this field is one of the most important, giving you access to the entire JavaScript ecosystem. Import libraries from a CDN, point to files on your own server or do whatever else you can think of.

JavaScript is executed in the same scope as your TakeyMakey code, so any globals that are declared are accessible directly from make. If your import doesn’t load correctly, you may want to use the setup field to prepare the import.

Example

{
  type: "import",
  value: "https://example.com/your/code.js",
  show: true,
}

Options

Input

Use these options when using the field with take.

value
string | Array<string>
A URL pointing to an external JavaScript resource, or an array of URLs.
show?
boolean
When true, the import URL will display in the form with a link to view the file.

Data

An import does not return any value and isn’t present in the data passed to make.