JSDOMParser.js |
This is a relatively lightweight DOMParser that is safe to use in a web
worker. This is far from a complete DOM implementation; however, it should
contain the minimal set of functionality necessary for Readability.js.
Aside from not implementing the full DOM API, there are other quirks to be
aware of when using the JSDOMParser:
1) Properly formed HTML/XML must be used. This means you should be extra
careful when using this parser on anything received directly from an
XMLHttpRequest. Providing a serialized string from an XMLSerializer,
however, should be safe (since the browser's XMLSerializer should
generate valid HTML/XML). Therefore, if parsing a document from an XHR,
the recommended approach is to do the XHR in the main thread, use
XMLSerializer.serializeToString() on the responseXML, and pass the
resulting string to the worker.
2) Live NodeLists are not supported. DOM methods and properties such as
getElementsByTagName() and childNodes return standard arrays. If you
want these lists to be updated when nodes are removed or added to the
document, you must take care to manually update them yourself.
|
36361 |
LICENSE.md |
|
553 |
Readability-readerable.js |
This code is heavily based on Arc90's readability.js (1.7.1) script
available at: http://code.google.com/p/arc90labs-readability
|
4162 |
Readability.js |
This code is heavily based on Arc90's readability.js (1.7.1) script
available at: http://code.google.com/p/arc90labs-readability
|
84033 |