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

libdom

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libdom

Lean Browser Library for typical DOM operations

latest
Source
npmnpm
Version
0.5.7
Version published
Weekly downloads
6.5K
581.62%
Maintainers
1
Weekly downloads
 
Created
Source

libdom

Lean Browser Library for typical DOM operations tested to run in IE8 up to modern browsers. This will be used to further create DOM UI libraries for browsers in the future.

Installation

This library is packaged by npm, so it can be installed by running code below.

npm install libdom --save

Webpack and other CommonJS setup

libdom can be required directly within webpack or browserify.

var libdom = require("libdom");

libdom.on(global.document,
        "load",
        function (event) {
            console.log('okay, got it! ', event.target);
        });

ES-2015 import

With es6 import enabled using babel, you can also import libdom module.

// default
import libdom from "libdom";

// tree shaking
import { on, addClass } from "libdom";

Directly embed script in HTML

libdom can embedded in HTML <script> tag. This requires preloading of libcore module.

<!doctype >

<html>
<head>
    <title>Test Libdom</title>
</head>
<body>
    <script src="node_modules/libcore/dist/libcore.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="node_modules/libdom/dist/libdom.min.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
    console.log("libdom object: ", libdom);
    </script>
</body>
</html>

Non-minified version of libdom is located in node_modules/libdom/dist/libdom.js.

Module API

Please refer to API Documentation for more information on Browser DOM helpers.

License

This Project is fully Open Source MIT licensed.

Keywords

DOM

FAQs

Package last updated on 12 Sep 2017

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