Providing
type="module"
on ascript
element tells HTML5-compliant browsers to treat the script as an ECMAScript module. A second fallback script can be provided to older browsers by providing thenomodule
attribute
These examples must be run by a webserver as HTML imports can only load resources from the same (non-file) domain or domains that support CORS. (see this issue for more info)
# 1. install dependencies
yarn install # or npm install
# 2. start simple express webserver at localhost:3000
yarn start # or npm start
# 3. open app and view examples
# http://localhost:3000