Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/module.ts>importStylesheet

A JavaScript extension package for building strong and modern applications.
Latest
function importStylesheet
import { importStylesheet } from "https://deno.land/x/ayonli_jsext@v0.9.72/module.ts";

Imports a stylesheet from the given URL to the current document, useful for loading 3rd-party libraries dynamically in the browser.

NOTE: This function is only available in the browser.

Examples

Example 1

import { importStylesheet } from "@ayonli/jsext/module";

await importStylesheet("https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/css/bootstrap.min.css");

Parameters

url: string

Returns

Promise<void>