unprint 0.11.5 → 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 +6 -6
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);
|
|
@@ -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
|
};
|