New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ezdom

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ezdom

simple DOM manipulation

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

ezdom

Build Status

Simple DOM manipulation.

var theDiv = document.querySelector('.some-div');
var theNewDiv = document.createElement('div');
theNewDiv.innerHTML = theDiv.innerHTML;
theNewDiv.appendChild(document.createTextNode('hello'));

// this will only add the new text node to theDiv
// note that the second argument can be theNewDiv or theNewDiv.innerHTML
EZDOM.updateElement(theDiv, theNewDiv);

EZDOM tries to be as efficient as possible and doesn't redraw the whole DOM every time it updates it. This makes it great for small, frequent updates.

Installation

via npm:

$ npm install --save ezdom

via bower:

$ bower install ezdom

Or download ./lib/ezdom.js and put it in a script tag.

Running tests

$ npm test

API

EZDOM.updateElement(left, right)

Update the element left so that it matches right. left and right must be DOM elements.

License

MIT License. See ./LICENSE for details.

Keywords

dom

FAQs

Package last updated on 19 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts