Initial updates for Reader View.

This commit is contained in:
Ascrod 2018-05-07 19:45:46 -04:00 committed by Roy Tam
commit 1c494e80a6
27 changed files with 1757 additions and 1786 deletions

View file

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
/* eslint-env mozilla/chrome-worker */
"use strict";
/**
@ -40,11 +42,12 @@ var Agent = {
*
* @param {object} uri URI data for the document.
* @param {string} serializedDoc The serialized document.
* @param {object} options Options object to pass to Readability.
*
* @return {object} Article object returned from Readability.
*/
parseDocument: function (uri, serializedDoc) {
parseDocument(uri, serializedDoc, options) {
let doc = new JSDOMParser().parse(serializedDoc);
return new Readability(uri, doc).parse();
return new Readability(uri, doc, options).parse();
},
};