ivi-dom
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

DOM Helpers

Browser Quirks

InnerHTML

function setInnerHTML(element: Element, content: string, isSVG: boolean): void;

setInnerHTML() sets innerHTML property for HTML and SVG elements (IE doesn't have native innerHTML on SVG elements).

KeyboardEvent

function getEventCharCode(ev: KeyboardEvent): number;

getEventCharCode() retrieves a normalized charCode from a KeyboardEvent.

function getEventKey(ev: KeyboardEvent): string;

getEventKey() retrieves a key from a KeybordEvent with a fallback for browsers that doesn't support key property.

function getMouseButtons(ev: MouseEvent): number;

getMouseButtons() retrieves a buttons property from a MouseEvent with a fallback implementation for Safari.

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i ivi-dom

    Weekly Downloads

    0

    Version

    0.2.0

    License

    MIT

    Last publish

    Collaborators

    • localvoid