@oxvo/browser 7.1.0 → 7.3.4
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/README.md +32 -0
- package/dist/cjs/common/interaction.d.ts +12 -1
- package/dist/cjs/common/messages.gen.d.ts +4 -7
- package/dist/cjs/entry.js +2382 -1191
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +2329 -1179
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/main/app/canvas.d.ts +13 -0
- package/dist/cjs/main/app/cross_domain_iframe.d.ts +44 -0
- package/dist/cjs/main/app/index.d.ts +63 -15
- package/dist/cjs/main/app/messages.gen.d.ts +2 -1
- package/dist/cjs/main/app/observer/observer.d.ts +16 -0
- package/dist/cjs/main/app/sanitizer.d.ts +5 -3
- package/dist/cjs/main/app/session.d.ts +1 -0
- package/dist/cjs/main/entry.d.ts +5 -5
- package/dist/cjs/main/index.d.ts +17 -1
- package/dist/cjs/main/modules/analytics/batcher.d.ts +6 -1
- package/dist/cjs/main/modules/analytics/index.d.ts +10 -0
- package/dist/cjs/main/modules/input.d.ts +2 -1
- package/dist/cjs/main/modules/markerWatcher.d.ts +4 -8
- package/dist/cjs/main/modules/mouse.d.ts +1 -0
- package/dist/cjs/main/modules/tagMatcher.d.ts +28 -0
- package/dist/cjs/main/singleton.d.ts +24 -0
- package/dist/cjs/main/utils.d.ts +2 -0
- package/dist/cjs/package.json +1 -0
- package/dist/lib/common/interaction.d.ts +12 -1
- package/dist/lib/common/messages.gen.d.ts +4 -7
- package/dist/lib/entry.js +2382 -1191
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +2329 -1179
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/main/app/canvas.d.ts +13 -0
- package/dist/lib/main/app/cross_domain_iframe.d.ts +44 -0
- package/dist/lib/main/app/index.d.ts +63 -15
- package/dist/lib/main/app/messages.gen.d.ts +2 -1
- package/dist/lib/main/app/observer/observer.d.ts +16 -0
- package/dist/lib/main/app/sanitizer.d.ts +5 -3
- package/dist/lib/main/app/session.d.ts +1 -0
- package/dist/lib/main/entry.d.ts +5 -5
- package/dist/lib/main/index.d.ts +17 -1
- package/dist/lib/main/modules/analytics/batcher.d.ts +6 -1
- package/dist/lib/main/modules/analytics/index.d.ts +10 -0
- package/dist/lib/main/modules/input.d.ts +2 -1
- package/dist/lib/main/modules/markerWatcher.d.ts +4 -8
- package/dist/lib/main/modules/mouse.d.ts +1 -0
- package/dist/lib/main/modules/tagMatcher.d.ts +28 -0
- package/dist/lib/main/singleton.d.ts +24 -0
- package/dist/lib/main/utils.d.ts +2 -0
- package/dist/types/common/interaction.d.ts +12 -1
- package/dist/types/common/messages.gen.d.ts +4 -7
- package/dist/types/main/app/canvas.d.ts +13 -0
- package/dist/types/main/app/cross_domain_iframe.d.ts +44 -0
- package/dist/types/main/app/index.d.ts +63 -15
- package/dist/types/main/app/messages.gen.d.ts +2 -1
- package/dist/types/main/app/observer/observer.d.ts +16 -0
- package/dist/types/main/app/sanitizer.d.ts +5 -3
- package/dist/types/main/app/session.d.ts +1 -0
- package/dist/types/main/entry.d.ts +5 -5
- package/dist/types/main/index.d.ts +17 -1
- package/dist/types/main/modules/analytics/batcher.d.ts +6 -1
- package/dist/types/main/modules/analytics/index.d.ts +10 -0
- package/dist/types/main/modules/input.d.ts +2 -1
- package/dist/types/main/modules/markerWatcher.d.ts +4 -8
- package/dist/types/main/modules/mouse.d.ts +1 -0
- package/dist/types/main/modules/tagMatcher.d.ts +28 -0
- package/dist/types/main/singleton.d.ts +24 -0
- package/dist/types/main/utils.d.ts +2 -0
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -29,6 +29,38 @@ await browser.start({
|
|
|
29
29
|
});
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
## Cross-Origin Iframes
|
|
33
|
+
|
|
34
|
+
Cross-origin iframe capture is opt-in on both pages. The top-level tracker must
|
|
35
|
+
allowlist every exact child origin, and each child tracker must name its exact
|
|
36
|
+
parent origin:
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
// Top-level page at https://www.example.com
|
|
40
|
+
const parentBrowser = new Browser({
|
|
41
|
+
siteKey: 'ws_live_01HZX8M4B3',
|
|
42
|
+
crossdomain: {
|
|
43
|
+
enabled: true,
|
|
44
|
+
childOrigins: ['https://checkout.example.com'],
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
await parentBrowser.start();
|
|
48
|
+
|
|
49
|
+
// Embedded page at https://checkout.example.com
|
|
50
|
+
const childBrowser = new Browser({
|
|
51
|
+
siteKey: 'ws_live_01HZX8M4B3',
|
|
52
|
+
crossdomain: {
|
|
53
|
+
enabled: true,
|
|
54
|
+
parentDomain: 'https://www.example.com',
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
await childBrowser.start();
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Wildcards and opaque origins are rejected. Parent and child pages must use the
|
|
61
|
+
same current tracker release; legacy and mixed cross-frame protocols fail
|
|
62
|
+
closed.
|
|
63
|
+
|
|
32
64
|
## Common Runtime Calls
|
|
33
65
|
|
|
34
66
|
```ts
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import Message from './messages.gen.js';
|
|
2
|
+
export type DataType = 'player' | 'assets' | 'devtools' | 'analytics';
|
|
2
3
|
export interface Options {
|
|
3
4
|
connAttemptCount?: number;
|
|
4
5
|
connAttemptGap?: number;
|
|
@@ -10,18 +11,22 @@ type Start = {
|
|
|
10
11
|
timestamp: number;
|
|
11
12
|
url: string;
|
|
12
13
|
tabId: string;
|
|
14
|
+
localDebug?: boolean;
|
|
13
15
|
} & Options;
|
|
14
16
|
type Auth = {
|
|
15
17
|
type: 'auth';
|
|
16
18
|
token: string;
|
|
17
19
|
beaconSizeLimit?: number;
|
|
20
|
+
protocolVersion?: number;
|
|
18
21
|
};
|
|
19
22
|
export type ToWorkerData = null | 'stop' | Start | Auth | Array<Message> | {
|
|
20
23
|
type: 'compressed';
|
|
21
24
|
batch: Uint8Array;
|
|
25
|
+
dataType: DataType;
|
|
22
26
|
} | {
|
|
23
27
|
type: 'uncompressed';
|
|
24
28
|
batch: Uint8Array;
|
|
29
|
+
dataType: DataType;
|
|
25
30
|
} | 'forceFlushBatch' | 'closing' | 'check_queue';
|
|
26
31
|
type Failure = {
|
|
27
32
|
type: 'failure';
|
|
@@ -30,8 +35,14 @@ type Failure = {
|
|
|
30
35
|
type QEmpty = {
|
|
31
36
|
type: 'queue_empty';
|
|
32
37
|
};
|
|
38
|
+
type LocalSave = {
|
|
39
|
+
type: 'local_save';
|
|
40
|
+
name: string;
|
|
41
|
+
batch: Uint8Array;
|
|
42
|
+
};
|
|
33
43
|
export type FromWorkerData = 'a_stop' | 'a_start' | Failure | 'not_init' | {
|
|
34
44
|
type: 'compress';
|
|
35
45
|
batch: Uint8Array;
|
|
36
|
-
|
|
46
|
+
dataType: DataType;
|
|
47
|
+
} | QEmpty | LocalSave;
|
|
37
48
|
export {};
|
|
@@ -61,7 +61,6 @@ export declare const enum Type {
|
|
|
61
61
|
JSException = 78,
|
|
62
62
|
Zustand = 79,
|
|
63
63
|
BatchMetadata = 81,
|
|
64
|
-
PartitionedMessage = 82,
|
|
65
64
|
NetworkRequest = 83,
|
|
66
65
|
WSChannel = 84,
|
|
67
66
|
ResourceTiming = 85,
|
|
@@ -442,11 +441,6 @@ export type BatchMetadata = [
|
|
|
442
441
|
number,
|
|
443
442
|
string
|
|
444
443
|
];
|
|
445
|
-
export type PartitionedMessage = [
|
|
446
|
-
Type.PartitionedMessage,
|
|
447
|
-
number,
|
|
448
|
-
number
|
|
449
|
-
];
|
|
450
444
|
export type NetworkRequest = [
|
|
451
445
|
Type.NetworkRequest,
|
|
452
446
|
string,
|
|
@@ -583,5 +577,8 @@ export type WebVitals = [
|
|
|
583
577
|
string,
|
|
584
578
|
string
|
|
585
579
|
];
|
|
586
|
-
|
|
580
|
+
export declare const ASSET_MESSAGES: ReadonlySet<number>;
|
|
581
|
+
export declare const DEVTOOLS_MESSAGES: ReadonlySet<number>;
|
|
582
|
+
export declare const ANALYTICS_MESSAGES: ReadonlySet<number>;
|
|
583
|
+
type Message = Timestamp | SetPageLocationDeprecated | SetViewportSize | SetViewportScroll | CreateDocument | CreateElementNode | CreateTextNode | MoveNode | RemoveNode | SetNodeAttribute | RemoveNodeAttribute | SetNodeData | SetNodeScroll | SetInputTarget | SetInputValue | SetInputChecked | MouseMove | NetworkRequestDeprecated | ConsoleLog | PageLoadTiming | PageRenderTiming | CustomEvent | UserID | UserAnonymousID | Metadata | StringDictGlobal | SetNodeAttributeDictGlobal | NodeAnimationResult | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecatedDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | SetNodeSlot | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | NetworkRequest | WSChannel | ResourceTiming | Incident | LongAnimationTask | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTimingDeprecated | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals;
|
|
587
584
|
export default Message;
|