Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parse5-based streaming parser #2

Merged
merged 3 commits into from
Sep 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
<script src="xhr-ndjson.js" defer></script>
<script src="streaming-iframe.js" defer></script>
<script src="streaming-sw.js" defer></script>
<script src="text-streams.js" defer></script>
<script src="streaming-element.js" defer></script>
<script src="parser.js" defer></script>
<script src="streaming-parser.js" defer></script>
</head>
<body>
<h1>Load comments using:</h1>
Expand All @@ -20,6 +23,7 @@ <h1>Load comments using:</h1>
<li><button class="xhr-ndjson">XHR ndjson + innerHTML</button> - processing the incomming data in chunks.</li>
<li><button class="streaming-iframe">Streaming iframe hack</button> - crazy enough to work?</li>
<li><button class="streaming-element">Streaming element</button> - the iframe hack as a web component.</li>
<li><button class="streaming-parser">Streaming parser</button> - using <a href="https://github.com/inikulin/parse5">parse5</a> with <a href="https://github.com/RReverser/dom-treeadapter/">DOM adapter</a>.</li>
<li><form action="sw-stream"><button disabled class="sw-stream">Streaming service worker</button></form> - Server render powered by service worker</li>
</ul>
<div class="content"></div>
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
{
"dependencies": {
"browserify": "^14.4.0",
"compressible": "^2.0.9",
"compression": "^1.6.2",
"express": "^4.14.0"
"dom-treeadapter": "RReverser/dom-treeadapter",
"express": "^4.14.0",
"parse5": "^3.0.2"
},
"scripts": {
"build": "browserify -r dom-treeadapter -r parse5/lib/parser -o parser.js",
"serve": "node server.js"
},
"private": true,
Expand Down
Loading