0.4.1 • Published 3 years ago

@daucus/html-loader v0.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@daucus/html-loader

Conceived for Daucus, but can also be used independently.

:book: Documentation

Web Components

html-loader

Load and render remote HTML template files

Properties

PropertyAttributeModifiersTypeDescription
fallbackfallbackreadonlystringDefault template's URL
hrefhrefstringTemplate's URL

Methods

MethodTypeDescription
staticContent(nodeOrString?: string | Node | undefined): voidInstantly render a static content instead of a remote HTML templatenodeOrString: The HTML string or Node to render.

Events

EventTypeDescription
html-loadedCustomEvent<{ href: string; }>HTML template successfully loaded
html-loading-errorAn error occured when trying to load an HTML template
html-resetCustomEvent<any>Element's content reset