@usertour/helpers 0.0.6 → 0.0.8
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/dist/{chunk-OASNBRBF.js → chunk-7IK5Q5N2.js} +3 -1
- package/dist/chunk-DEG6MTU7.js +318 -0
- package/dist/conditions.cjs +256 -12
- package/dist/conditions.d.cts +1 -1
- package/dist/conditions.d.ts +1 -1
- package/dist/conditions.js +2 -1
- package/dist/finderx.cjs +346 -0
- package/dist/finderx.d.cts +47 -0
- package/dist/finderx.d.ts +47 -0
- package/dist/finderx.js +15 -0
- package/dist/globals.d.cts +1 -1
- package/dist/globals.d.ts +1 -1
- package/dist/index.cjs +335 -13
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +16 -4
- package/package.json +11 -11
package/dist/finderx.cjs
ADDED
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/finderx.ts
|
|
21
|
+
var finderx_exports = {};
|
|
22
|
+
__export(finderx_exports, {
|
|
23
|
+
finder: () => finder,
|
|
24
|
+
finderV2: () => finderV2,
|
|
25
|
+
finderX: () => finderX,
|
|
26
|
+
parserV2: () => parserV2,
|
|
27
|
+
parserX: () => parserX
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(finderx_exports);
|
|
30
|
+
var import_finder = require("@medv/finder");
|
|
31
|
+
var finderAttrs = [
|
|
32
|
+
"data-for",
|
|
33
|
+
"data-id",
|
|
34
|
+
"data-testid",
|
|
35
|
+
"data-test-id",
|
|
36
|
+
"for",
|
|
37
|
+
"id",
|
|
38
|
+
"name",
|
|
39
|
+
"placeholder",
|
|
40
|
+
"role"
|
|
41
|
+
];
|
|
42
|
+
var defaultConfig = {
|
|
43
|
+
idName: () => false,
|
|
44
|
+
className: () => false,
|
|
45
|
+
tagName: () => false,
|
|
46
|
+
attr: () => false,
|
|
47
|
+
seedMinLength: 1,
|
|
48
|
+
optimizedMinLength: 2,
|
|
49
|
+
threshold: 1e3,
|
|
50
|
+
maxNumberOfTries: 1e4
|
|
51
|
+
};
|
|
52
|
+
var finderConfigs = [
|
|
53
|
+
{
|
|
54
|
+
...defaultConfig,
|
|
55
|
+
tagName: () => true
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
...defaultConfig,
|
|
59
|
+
idName: () => true
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
...defaultConfig,
|
|
63
|
+
tagName: () => true,
|
|
64
|
+
attr: (name) => finderAttrs.includes(name)
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
...defaultConfig,
|
|
68
|
+
className: () => true,
|
|
69
|
+
attr: (name) => finderAttrs.includes(name)
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
...defaultConfig,
|
|
73
|
+
tagName: () => true,
|
|
74
|
+
idName: () => true,
|
|
75
|
+
className: () => true,
|
|
76
|
+
attr: () => false
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
...defaultConfig,
|
|
80
|
+
tagName: () => true,
|
|
81
|
+
idName: () => true,
|
|
82
|
+
className: () => true,
|
|
83
|
+
attr: (name) => finderAttrs.includes(name)
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
function getMaxDepth(node) {
|
|
87
|
+
if (node.parentNode) {
|
|
88
|
+
return getMaxDepth(node.parentNode);
|
|
89
|
+
}
|
|
90
|
+
return node.depth;
|
|
91
|
+
}
|
|
92
|
+
function queryNodeListBySelectors(selectors, rootDocument, removeRepeat = true) {
|
|
93
|
+
const nodes = [];
|
|
94
|
+
if (!selectors) {
|
|
95
|
+
return nodes;
|
|
96
|
+
}
|
|
97
|
+
for (const s of selectors) {
|
|
98
|
+
const els = rootDocument.querySelectorAll(s.replace(/\\\\/g, "\\"));
|
|
99
|
+
if (els && els.length > 0) {
|
|
100
|
+
nodes.push(...Array.from(els));
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return removeRepeat ? [...new Set(nodes)] : nodes;
|
|
104
|
+
}
|
|
105
|
+
function findMostRecurringNode(nodes) {
|
|
106
|
+
const m = /* @__PURE__ */ new Map();
|
|
107
|
+
let finalNode = nodes[0];
|
|
108
|
+
let count = 0;
|
|
109
|
+
for (const node of nodes) {
|
|
110
|
+
const i = m.get(node) ? m.get(node) + 1 : 1;
|
|
111
|
+
m.set(node, i);
|
|
112
|
+
}
|
|
113
|
+
m.forEach((value, key) => {
|
|
114
|
+
if (value > count) {
|
|
115
|
+
count = value;
|
|
116
|
+
finalNode = key;
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
return finalNode;
|
|
120
|
+
}
|
|
121
|
+
function compareParentNode(node, el, rootDocument, isCompareSibings = false) {
|
|
122
|
+
let nodeParentNode = node.parentNode;
|
|
123
|
+
let elParentElement = el.parentElement;
|
|
124
|
+
const maxDepth = getMaxDepth(node);
|
|
125
|
+
const xresult = {
|
|
126
|
+
maxDepth,
|
|
127
|
+
failedDepth: 0,
|
|
128
|
+
success: true
|
|
129
|
+
};
|
|
130
|
+
while (nodeParentNode && elParentElement) {
|
|
131
|
+
if (elParentElement === rootDocument) {
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
if (elParentElement === document.body || elParentElement === document.documentElement || elParentElement.parentElement === document.body) {
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
const parentNodes = queryNodeListBySelectors(nodeParentNode.selectors, rootDocument);
|
|
138
|
+
const isMatchSibings = isCompareSibings ? compareSibingsNode(nodeParentNode, elParentElement, rootDocument) : true;
|
|
139
|
+
if (!parentNodes || parentNodes.length === 0 || !parentNodes.includes(elParentElement) || !isMatchSibings) {
|
|
140
|
+
xresult.failedDepth = nodeParentNode.depth;
|
|
141
|
+
xresult.success = false;
|
|
142
|
+
}
|
|
143
|
+
nodeParentNode = nodeParentNode.parentNode;
|
|
144
|
+
elParentElement = elParentElement.parentElement;
|
|
145
|
+
}
|
|
146
|
+
return xresult;
|
|
147
|
+
}
|
|
148
|
+
function compareSibingsNode(node, el, rootDocument) {
|
|
149
|
+
let isMatchNext = true;
|
|
150
|
+
let isMatchPrevious = true;
|
|
151
|
+
const { previousElementSelectors, nextElementSelectors } = node;
|
|
152
|
+
if (nextElementSelectors && nextElementSelectors.length > 0) {
|
|
153
|
+
const nextElementSiblings = queryNodeListBySelectors(nextElementSelectors, rootDocument);
|
|
154
|
+
isMatchNext = el.nextElementSibling && nextElementSiblings.includes(el.nextElementSibling);
|
|
155
|
+
}
|
|
156
|
+
if (previousElementSelectors && previousElementSelectors.length > 0) {
|
|
157
|
+
const previousElementSiblings = queryNodeListBySelectors(
|
|
158
|
+
previousElementSelectors,
|
|
159
|
+
rootDocument
|
|
160
|
+
);
|
|
161
|
+
isMatchPrevious = el.previousElementSibling && previousElementSiblings.includes(el.previousElementSibling);
|
|
162
|
+
}
|
|
163
|
+
return isMatchNext && isMatchPrevious;
|
|
164
|
+
}
|
|
165
|
+
function queryElementSelectors(input) {
|
|
166
|
+
const classes = Array.from(input.classList);
|
|
167
|
+
const selectors = [];
|
|
168
|
+
const configs = [...finderConfigs];
|
|
169
|
+
for (const className of classes) {
|
|
170
|
+
configs.push({
|
|
171
|
+
...defaultConfig,
|
|
172
|
+
className: (name) => {
|
|
173
|
+
if (classes.filter((cn) => cn !== className).includes(name)) {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
try {
|
|
181
|
+
for (const cfg of configs) {
|
|
182
|
+
selectors.push(finder(input, cfg));
|
|
183
|
+
}
|
|
184
|
+
} catch (_) {
|
|
185
|
+
return selectors;
|
|
186
|
+
}
|
|
187
|
+
return [...new Set(selectors)];
|
|
188
|
+
}
|
|
189
|
+
function parseSelectorsTree(input, parentNode, depth = 0) {
|
|
190
|
+
const selectors = queryElementSelectors(input);
|
|
191
|
+
if (selectors.length === 0) {
|
|
192
|
+
return parentNode;
|
|
193
|
+
}
|
|
194
|
+
const currentNode = {
|
|
195
|
+
previousElementSelectors: [],
|
|
196
|
+
nextElementSelectors: [],
|
|
197
|
+
selectors,
|
|
198
|
+
depth
|
|
199
|
+
};
|
|
200
|
+
if (input.previousElementSibling) {
|
|
201
|
+
currentNode.previousElementSelectors = queryElementSelectors(input.previousElementSibling);
|
|
202
|
+
}
|
|
203
|
+
if (input.nextElementSibling) {
|
|
204
|
+
currentNode.nextElementSelectors = queryElementSelectors(input.nextElementSibling);
|
|
205
|
+
}
|
|
206
|
+
if (parentNode === null) {
|
|
207
|
+
if (input.parentElement) {
|
|
208
|
+
parseSelectorsTree(input.parentElement, currentNode, depth + 1);
|
|
209
|
+
}
|
|
210
|
+
return currentNode;
|
|
211
|
+
}
|
|
212
|
+
parentNode.parentNode = currentNode;
|
|
213
|
+
if (input.parentElement) {
|
|
214
|
+
parseSelectorsTree(input.parentElement, currentNode, depth + 1);
|
|
215
|
+
}
|
|
216
|
+
return parentNode;
|
|
217
|
+
}
|
|
218
|
+
function finderMostPrecisionElement(elements, node, rootDocument, precision) {
|
|
219
|
+
const successEls = [];
|
|
220
|
+
let failedData = {
|
|
221
|
+
el: null,
|
|
222
|
+
failedDepth: 0,
|
|
223
|
+
maxDepth: 0
|
|
224
|
+
};
|
|
225
|
+
for (const el of elements) {
|
|
226
|
+
const { success, failedDepth, maxDepth } = compareParentNode(node, el, rootDocument);
|
|
227
|
+
if (success) {
|
|
228
|
+
successEls.push(el);
|
|
229
|
+
} else if (!failedData.el || failedDepth > failedData.failedDepth) {
|
|
230
|
+
failedData = { el, failedDepth, maxDepth };
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
if (successEls.length === 1) {
|
|
234
|
+
return successEls[0];
|
|
235
|
+
}
|
|
236
|
+
if (successEls.length > 1) {
|
|
237
|
+
let tempEl = successEls[0];
|
|
238
|
+
let tempFailedDepth = 0;
|
|
239
|
+
for (const el of successEls) {
|
|
240
|
+
const { success, failedDepth } = compareParentNode(node, el, rootDocument, true);
|
|
241
|
+
if (success) {
|
|
242
|
+
return el;
|
|
243
|
+
}
|
|
244
|
+
if (failedDepth > tempFailedDepth) {
|
|
245
|
+
tempFailedDepth = failedDepth;
|
|
246
|
+
tempEl = el;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return tempEl;
|
|
250
|
+
}
|
|
251
|
+
if (failedData.el) {
|
|
252
|
+
const { failedDepth, maxDepth, el } = failedData;
|
|
253
|
+
const rate = (failedDepth - 1) / maxDepth * 10;
|
|
254
|
+
if (rate >= precision) {
|
|
255
|
+
return el;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
function finder(input, options) {
|
|
261
|
+
return (0, import_finder.finder)(input, options);
|
|
262
|
+
}
|
|
263
|
+
function parserX(input) {
|
|
264
|
+
return parseSelectorsTree(input, null);
|
|
265
|
+
}
|
|
266
|
+
function parserV2(element) {
|
|
267
|
+
var _a;
|
|
268
|
+
const content = (_a = element.innerText) != null ? _a : "";
|
|
269
|
+
const selectors = parseSelectorsTree(element, null);
|
|
270
|
+
const selectorsList = queryElementSelectors(element);
|
|
271
|
+
return { content, selectors, selectorsList };
|
|
272
|
+
}
|
|
273
|
+
function finderV2(target, root) {
|
|
274
|
+
const {
|
|
275
|
+
selectors,
|
|
276
|
+
content = "",
|
|
277
|
+
sequence = 0,
|
|
278
|
+
precision = "strict",
|
|
279
|
+
isDynamicContent = false,
|
|
280
|
+
customSelector = "",
|
|
281
|
+
type = "auto"
|
|
282
|
+
} = target;
|
|
283
|
+
if (type === "auto") {
|
|
284
|
+
const mapping = {
|
|
285
|
+
looser: 1,
|
|
286
|
+
loose: 3,
|
|
287
|
+
loosest: 5,
|
|
288
|
+
strict: 7,
|
|
289
|
+
stricter: 8,
|
|
290
|
+
strictest: 10
|
|
291
|
+
};
|
|
292
|
+
const el = finderX(selectors, root, mapping[precision]);
|
|
293
|
+
if (el) {
|
|
294
|
+
if (isDynamicContent && content && el.innerText !== content) {
|
|
295
|
+
return null;
|
|
296
|
+
}
|
|
297
|
+
return el;
|
|
298
|
+
}
|
|
299
|
+
} else {
|
|
300
|
+
const sequenceMapping = {
|
|
301
|
+
"1st": 0,
|
|
302
|
+
"2st": 1,
|
|
303
|
+
"3st": 2,
|
|
304
|
+
"4st": 3,
|
|
305
|
+
"5st": 4
|
|
306
|
+
};
|
|
307
|
+
if (customSelector) {
|
|
308
|
+
const selector = customSelector.replace(/\\\\/g, "\\");
|
|
309
|
+
const els = root.querySelectorAll(selector);
|
|
310
|
+
if (els.length > 0) {
|
|
311
|
+
const el = els[sequenceMapping[sequence]] || els[0];
|
|
312
|
+
if (content && el.innerText.trim() !== content) {
|
|
313
|
+
return null;
|
|
314
|
+
}
|
|
315
|
+
return el;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
|
+
function finderX(node, root, precision = 10) {
|
|
322
|
+
if (!node || node.selectors.length === 0) {
|
|
323
|
+
return null;
|
|
324
|
+
}
|
|
325
|
+
const rootDocument = root || document;
|
|
326
|
+
const elements = [];
|
|
327
|
+
const nodeList = queryNodeListBySelectors(node.selectors, rootDocument, false);
|
|
328
|
+
if (!nodeList || nodeList.length === 0) {
|
|
329
|
+
return null;
|
|
330
|
+
}
|
|
331
|
+
if ([...new Set(nodeList)].length !== nodeList.length) {
|
|
332
|
+
const el = findMostRecurringNode(nodeList);
|
|
333
|
+
elements.push(el);
|
|
334
|
+
} else {
|
|
335
|
+
elements.push(...nodeList);
|
|
336
|
+
}
|
|
337
|
+
return finderMostPrecisionElement(elements, node, rootDocument, precision);
|
|
338
|
+
}
|
|
339
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
340
|
+
0 && (module.exports = {
|
|
341
|
+
finder,
|
|
342
|
+
finderV2,
|
|
343
|
+
finderX,
|
|
344
|
+
parserV2,
|
|
345
|
+
parserX
|
|
346
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
type Options = {
|
|
2
|
+
root: Element;
|
|
3
|
+
idName: (name: string) => boolean;
|
|
4
|
+
className: (name: string) => boolean;
|
|
5
|
+
tagName: (name: string) => boolean;
|
|
6
|
+
attr: (name: string, value: string) => boolean;
|
|
7
|
+
seedMinLength: number;
|
|
8
|
+
optimizedMinLength: number;
|
|
9
|
+
threshold: number;
|
|
10
|
+
maxNumberOfTries: number;
|
|
11
|
+
};
|
|
12
|
+
type XNode = {
|
|
13
|
+
selectors: string[];
|
|
14
|
+
nextElementSelectors: string[];
|
|
15
|
+
previousElementSelectors: string[];
|
|
16
|
+
depth: number;
|
|
17
|
+
parentNode?: XNode | null;
|
|
18
|
+
};
|
|
19
|
+
type XData = {
|
|
20
|
+
node: XNode;
|
|
21
|
+
};
|
|
22
|
+
type XResult = {
|
|
23
|
+
maxDepth: number;
|
|
24
|
+
failedDepth: number;
|
|
25
|
+
success: boolean;
|
|
26
|
+
};
|
|
27
|
+
type Target = {
|
|
28
|
+
selectors?: any;
|
|
29
|
+
content?: string;
|
|
30
|
+
sequence?: string;
|
|
31
|
+
precision?: string;
|
|
32
|
+
isDynamicContent?: boolean;
|
|
33
|
+
customSelector?: string;
|
|
34
|
+
type?: string;
|
|
35
|
+
};
|
|
36
|
+
declare function finder(input: Element, options?: Partial<Options>): string;
|
|
37
|
+
declare function parserX(input: Element): XNode | null;
|
|
38
|
+
type TargetResult = {
|
|
39
|
+
content: string;
|
|
40
|
+
selectors: XNode | null;
|
|
41
|
+
selectorsList: string[];
|
|
42
|
+
};
|
|
43
|
+
declare function parserV2(element: HTMLElement): TargetResult;
|
|
44
|
+
declare function finderV2(target: Target, root: Element | Document): HTMLElement | null;
|
|
45
|
+
declare function finderX(node: XNode, root: Element | Document, precision?: number): Element | null;
|
|
46
|
+
|
|
47
|
+
export { type Options, type Target, type TargetResult, type XData, type XNode, type XResult, finder, finderV2, finderX, parserV2, parserX };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
type Options = {
|
|
2
|
+
root: Element;
|
|
3
|
+
idName: (name: string) => boolean;
|
|
4
|
+
className: (name: string) => boolean;
|
|
5
|
+
tagName: (name: string) => boolean;
|
|
6
|
+
attr: (name: string, value: string) => boolean;
|
|
7
|
+
seedMinLength: number;
|
|
8
|
+
optimizedMinLength: number;
|
|
9
|
+
threshold: number;
|
|
10
|
+
maxNumberOfTries: number;
|
|
11
|
+
};
|
|
12
|
+
type XNode = {
|
|
13
|
+
selectors: string[];
|
|
14
|
+
nextElementSelectors: string[];
|
|
15
|
+
previousElementSelectors: string[];
|
|
16
|
+
depth: number;
|
|
17
|
+
parentNode?: XNode | null;
|
|
18
|
+
};
|
|
19
|
+
type XData = {
|
|
20
|
+
node: XNode;
|
|
21
|
+
};
|
|
22
|
+
type XResult = {
|
|
23
|
+
maxDepth: number;
|
|
24
|
+
failedDepth: number;
|
|
25
|
+
success: boolean;
|
|
26
|
+
};
|
|
27
|
+
type Target = {
|
|
28
|
+
selectors?: any;
|
|
29
|
+
content?: string;
|
|
30
|
+
sequence?: string;
|
|
31
|
+
precision?: string;
|
|
32
|
+
isDynamicContent?: boolean;
|
|
33
|
+
customSelector?: string;
|
|
34
|
+
type?: string;
|
|
35
|
+
};
|
|
36
|
+
declare function finder(input: Element, options?: Partial<Options>): string;
|
|
37
|
+
declare function parserX(input: Element): XNode | null;
|
|
38
|
+
type TargetResult = {
|
|
39
|
+
content: string;
|
|
40
|
+
selectors: XNode | null;
|
|
41
|
+
selectorsList: string[];
|
|
42
|
+
};
|
|
43
|
+
declare function parserV2(element: HTMLElement): TargetResult;
|
|
44
|
+
declare function finderV2(target: Target, root: Element | Document): HTMLElement | null;
|
|
45
|
+
declare function finderX(node: XNode, root: Element | Document, precision?: number): Element | null;
|
|
46
|
+
|
|
47
|
+
export { type Options, type Target, type TargetResult, type XData, type XNode, type XResult, finder, finderV2, finderX, parserV2, parserX };
|
package/dist/finderx.js
ADDED
package/dist/globals.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { UserTourTypes } from '@usertour/types/';
|
|
|
3
3
|
declare const win: (UserTourTypes.WindowWithUsertour & typeof globalThis) | undefined;
|
|
4
4
|
declare const ArrayProto: any[];
|
|
5
5
|
declare const nativeForEach: (callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any) => void;
|
|
6
|
-
declare const nativeIndexOf: (searchElement: any, fromIndex?: number
|
|
6
|
+
declare const nativeIndexOf: (searchElement: any, fromIndex?: number) => number;
|
|
7
7
|
declare const navigator: Navigator | undefined;
|
|
8
8
|
declare const document: Document | undefined;
|
|
9
9
|
declare const location: Location | undefined;
|
package/dist/globals.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { UserTourTypes } from '@usertour/types/';
|
|
|
3
3
|
declare const win: (UserTourTypes.WindowWithUsertour & typeof globalThis) | undefined;
|
|
4
4
|
declare const ArrayProto: any[];
|
|
5
5
|
declare const nativeForEach: (callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any) => void;
|
|
6
|
-
declare const nativeIndexOf: (searchElement: any, fromIndex?: number
|
|
6
|
+
declare const nativeIndexOf: (searchElement: any, fromIndex?: number) => number;
|
|
7
7
|
declare const navigator: Navigator | undefined;
|
|
8
8
|
declare const document: Document | undefined;
|
|
9
9
|
declare const location: Location | undefined;
|