Skip to content

No longer global by default

Choose a tag to compare

@tdumitrescu tdumitrescu released this 24 Aug 06:37
· 30 commits to master since this release

Fixes longstanding issue #8 with a new API, allowing consumers to import scoped vars rather than relying on global patches.

Upgrading from v1.x

If you currently rely on require('html-element') to create globals such as document and Element, you should instead require('html-element/global-shim') when upgrading to v2.

For non-global usage, you can import objects directly from the main package, e.g.:

var document = require('html-element').document;

or

import { Element } from 'html-element';