1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.shadowFnFactory = void 0;
|
7 |
|
8 | const shadowFnFactory = function (elementSelector, qsAll) {
|
9 | const strFn = `
|
10 | (function() {
|
11 | // element has a shadowRoot property
|
12 | if (this.shadowRoot) {
|
13 | return this.shadowRoot.querySelector${qsAll ? 'All' : ''}('${elementSelector}')
|
14 | }
|
15 | // fall back to querying the element directly if not
|
16 | return this.querySelector${qsAll ? 'All' : ''}('${elementSelector}')
|
17 | })`;
|
18 | return eval(strFn);
|
19 | };
|
20 |
|
21 | exports.shadowFnFactory = shadowFnFactory; |
\ | No newline at end of file |