unprint 0.10.0 → 0.10.1

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/app.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unprint",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Simplify common web scraping tasks while staying in control of the data.",
5
5
  "main": "src/app.js",
6
6
  "scripts": {
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.querySelector(selector)
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 Array.from(context.querySelectorAll(selector))
775
+ return queryElements({ element: context }, selector)
776
776
  .map((element) => init(element, null, options));
777
777
  }
778
778