unprint 0.10.0 → 0.10.2
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 +5 -3
package/package.json
CHANGED
package/src/app.js
CHANGED
|
@@ -732,7 +732,7 @@ function init(elementOrHtml, selector, options = {}) {
|
|
|
732
732
|
}
|
|
733
733
|
|
|
734
734
|
const element = selector
|
|
735
|
-
? elementOrHtml
|
|
735
|
+
? queryElement({ element: elementOrHtml }, selector)
|
|
736
736
|
: elementOrHtml;
|
|
737
737
|
|
|
738
738
|
if (!element) {
|
|
@@ -772,7 +772,7 @@ function initAll(context, selector, options = {}) {
|
|
|
772
772
|
return handleError(new Error('Init context is not a DOM element, HTML or an array'), 'INVALID_CONTEXT');
|
|
773
773
|
}
|
|
774
774
|
|
|
775
|
-
return
|
|
775
|
+
return queryElements({ element: context }, selector)
|
|
776
776
|
.map((element) => init(element, null, options));
|
|
777
777
|
}
|
|
778
778
|
|
|
@@ -788,9 +788,11 @@ async function request(url, body, customOptions = {}, method = 'GET') {
|
|
|
788
788
|
method,
|
|
789
789
|
data: body,
|
|
790
790
|
validateStatus: null,
|
|
791
|
+
...options,
|
|
791
792
|
timeout: options.timeout,
|
|
792
793
|
signal: options.abortSignal,
|
|
793
|
-
|
|
794
|
+
httpAgent: options.httpAgent,
|
|
795
|
+
httpsAgent: options.httpsAgent,
|
|
794
796
|
});
|
|
795
797
|
|
|
796
798
|
if (!(res.status >= 200 && res.status < 300)) {
|