Get Started

DaffExternalScript

Represents the structure of an external script that can be loaded into a document.

Properties

Name Type Description
src string The source URL of the script.
async boolean Optional. Indicates whether the script should be loaded asynchronously.
defer boolean Optional. Indicates whether the script should be deferred in loading.
__index Optional. Custom attributes for the script. The keys must start with 'data-' followed by any string.

Examples

Using DaffExternalScript interface to define an external script object

const externalScript: DaffExternalScript = {
 src: 'https://example.com/script.js',
 async: true,
 defer: false,
 'data-custom-attribute': 'value',
};
Graycore, LLC © 2018 - 2025. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.