unprint 0.11.4 → 0.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/app.js +8 -8
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -31,10 +31,6 @@ function handleError(error, code) {
|
|
|
31
31
|
virtualConsole.on('error', (message) => handleError(message, 'JSDOM'));
|
|
32
32
|
virtualConsole.on('jsdomError', (message) => handleError(message, 'JSDOM'));
|
|
33
33
|
|
|
34
|
-
const defaultOptions = {
|
|
35
|
-
trim: true,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
34
|
let globalOptions = {};
|
|
39
35
|
|
|
40
36
|
function configure(newOptions) {
|
|
@@ -154,7 +150,12 @@ function extractContent(element, options) {
|
|
|
154
150
|
}
|
|
155
151
|
|
|
156
152
|
function queryContent(context, selector, customOptions) {
|
|
157
|
-
const options = {
|
|
153
|
+
const options = {
|
|
154
|
+
...context.options,
|
|
155
|
+
trim: true,
|
|
156
|
+
...customOptions,
|
|
157
|
+
};
|
|
158
|
+
|
|
158
159
|
const target = queryElement(context, selector, options);
|
|
159
160
|
|
|
160
161
|
return extractContent(target, options);
|
|
@@ -530,7 +531,7 @@ function queryStyles(context, selector, customOptions) {
|
|
|
530
531
|
return elStyles.filter(Boolean);
|
|
531
532
|
}
|
|
532
533
|
|
|
533
|
-
function queryVideo(context, selector = 'source', customOptions) {
|
|
534
|
+
function queryVideo(context, selector = 'video source', customOptions) {
|
|
534
535
|
const options = {
|
|
535
536
|
...context.options,
|
|
536
537
|
attribute: 'src',
|
|
@@ -543,7 +544,7 @@ function queryVideo(context, selector = 'source', customOptions) {
|
|
|
543
544
|
return prefixUrl(videoUrl, options.origin, options);
|
|
544
545
|
}
|
|
545
546
|
|
|
546
|
-
function queryVideos(context, selector = 'source', customOptions) {
|
|
547
|
+
function queryVideos(context, selector = 'video source', customOptions) {
|
|
547
548
|
const options = {
|
|
548
549
|
...context.options,
|
|
549
550
|
attribute: 'src',
|
|
@@ -894,7 +895,6 @@ async function request(url, body, customOptions = {}, method = 'GET') {
|
|
|
894
895
|
}
|
|
895
896
|
|
|
896
897
|
const contextOptions = {
|
|
897
|
-
...defaultOptions,
|
|
898
898
|
...customOptions,
|
|
899
899
|
origin: url,
|
|
900
900
|
};
|