Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html5

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html5 - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

t

14

package.json
{
"name": "html5",
"description": "HTML5 HTML parser, including support for SVG and MathML foreign content",
"version": "v1.0.0",
"version": "v1.0.1",
"author": {

@@ -19,8 +19,2 @@ "name": "Aria Stewart",

{
"name": "Aria Stewart",
"email": "aredridel@nbtsc.org",
"github": "aredridel",
"url": "http://dinhe.net/~aredridel/"
},
{
"name": "Arthur Taylor",

@@ -44,8 +38,6 @@ "github": "codders"

"dependencies": {
"jsdom": "^1.0.0",
"opts": "^1.2.1",
"html5-entities": "^0.5.0"
},
"optionalDependencies": {
"jsdom": ">= 0.9.0"
},
"devDependencies": {

@@ -65,5 +57,5 @@ "tape": "^1.0.4",

"scripts": {
"test": "PATH=$PATH:`npm bin` tape `find test -name '*-test.js'`"
"test": "tape `find test -name '*-test.js'`"
},
"license": "MIT"
}

@@ -6,26 +6,22 @@ HTML5 Parser for node.js

Example (With jQuery!)
----------------------
```js
/* Before you run this, run:
(cd deps/jquery; rake)
*/
var HTML5 = require('html5'),
Script = process.binding('evals').Script,
util = require('util'),
fs = require('fs'),
jsdom = require('jsdom'),
window = jsdom.jsdom(null, null, {parser: HTML5}).createWindow()
Examples
--------
var parser = new HTML5.Parser({document: window.document});
A simple example:
var inputfile = fs.readFileSync('doc/jquery-example.html');
parser.parse(inputfile);
```javascript
var HTML5 = require('html5');
var jsdom = require('jsdom');
var core = jsdom.browserAugmentation(jsdom.level(3));
jsdom.jQueryify(window, __dirname + '/deps/jquery/dist/jquery.js', function(window, jquery) {
Script.runInNewContext('jQuery("p").append("<b>Hi!</b>")', window);
util.puts(window.document.innerHTML);
var impl = new core.DOMImplementation();
var document = impl.createDocument();
var parser = new HTML5.JSDOMParser(document, core);
});
parser.parse('<p>I am a very small HTML document</p>');
console.log(document.getElementsByTagName("p")[0].innerHTML);
```
Interesting features

@@ -54,4 +50,2 @@ --------------------

(At time of this writing, 1800 tests pass)
Git repository at http://dinhe.net/~aredridel/projects/js/html5.git/
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc