Package Exports
- libdom
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (libdom) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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 --saveWebpack 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.