initial slot support test'
This commit is contained in:
parent
50e5db82ef
commit
7a85f318b6
19 changed files with 2169 additions and 1933 deletions
|
|
@ -10,5 +10,5 @@ func IsMobileType(id int) bool {
|
|||
}
|
||||
|
||||
func IsDOMType(id int) bool {
|
||||
return 0 == id || 4 == id || 5 == id || 6 == id || 7 == id || 8 == id || 9 == id || 10 == id || 11 == id || 12 == id || 13 == id || 14 == id || 15 == id || 16 == id || 18 == id || 19 == id || 20 == id || 34 == id || 35 == id || 37 == id || 38 == id || 49 == id || 50 == id || 51 == id || 43 == id || 52 == id || 54 == id || 55 == id || 57 == id || 58 == id || 59 == id || 60 == id || 61 == id || 67 == id || 68 == id || 69 == id || 70 == id || 71 == id || 72 == id || 73 == id || 74 == id || 75 == id || 76 == id || 77 == id || 113 == id || 114 == id || 117 == id || 118 == id || 119 == id || 122 == id || 93 == id || 96 == id || 100 == id || 101 == id || 102 == id || 103 == id || 104 == id || 105 == id || 106 == id || 111 == id
|
||||
}
|
||||
return 0 == id || 4 == id || 5 == id || 6 == id || 7 == id || 8 == id || 9 == id || 10 == id || 11 == id || 12 == id || 13 == id || 14 == id || 15 == id || 16 == id || 18 == id || 19 == id || 20 == id || 34 == id || 35 == id || 37 == id || 38 == id || 49 == id || 50 == id || 51 == id || 43 == id || 52 == id || 54 == id || 55 == id || 57 == id || 58 == id || 59 == id || 60 == id || 61 == id || 65 == id || 67 == id || 68 == id || 69 == id || 70 == id || 71 == id || 72 == id || 73 == id || 74 == id || 75 == id || 76 == id || 77 == id || 113 == id || 114 == id || 117 == id || 118 == id || 119 == id || 122 == id || 93 == id || 96 == id || 100 == id || 101 == id || 102 == id || 103 == id || 104 == id || 105 == id || 106 == id || 111 == id
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -626,6 +626,14 @@ class CustomIssue(Message):
|
|||
self.payload = payload
|
||||
|
||||
|
||||
class SetNodeSlot(Message):
|
||||
__id__ = 65
|
||||
|
||||
def __init__(self, id, slot_id):
|
||||
self.id = id
|
||||
self.slot_id = slot_id
|
||||
|
||||
|
||||
class AssetCache(Message):
|
||||
__id__ = 66
|
||||
|
||||
|
|
|
|||
|
|
@ -935,6 +935,17 @@ cdef class CustomIssue(PyMessage):
|
|||
self.payload = payload
|
||||
|
||||
|
||||
cdef class SetNodeSlot(PyMessage):
|
||||
cdef public int __id__
|
||||
cdef public unsigned long id
|
||||
cdef public unsigned long slot_id
|
||||
|
||||
def __init__(self, unsigned long id, unsigned long slot_id):
|
||||
self.__id__ = 65
|
||||
self.id = id
|
||||
self.slot_id = slot_id
|
||||
|
||||
|
||||
cdef class AssetCache(PyMessage):
|
||||
cdef public int __id__
|
||||
cdef public str url
|
||||
|
|
|
|||
|
|
@ -587,6 +587,12 @@ class MessageCodec(Codec):
|
|||
payload=self.read_string(reader)
|
||||
)
|
||||
|
||||
if message_id == 65:
|
||||
return SetNodeSlot(
|
||||
id=self.read_uint(reader),
|
||||
slot_id=self.read_uint(reader)
|
||||
)
|
||||
|
||||
if message_id == 66:
|
||||
return AssetCache(
|
||||
url=self.read_string(reader)
|
||||
|
|
|
|||
|
|
@ -685,6 +685,12 @@ cdef class MessageCodec:
|
|||
payload=self.read_string(reader)
|
||||
)
|
||||
|
||||
if message_id == 65:
|
||||
return SetNodeSlot(
|
||||
id=self.read_uint(reader),
|
||||
slot_id=self.read_uint(reader)
|
||||
)
|
||||
|
||||
if message_id == 66:
|
||||
return AssetCache(
|
||||
url=self.read_string(reader)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import {
|
|||
VShadowRoot,
|
||||
VText,
|
||||
OnloadVRoot,
|
||||
VSlot,
|
||||
} from './VirtualDOM';
|
||||
import { deleteRule, insertRule } from './safeCSSRules';
|
||||
|
||||
|
|
@ -61,6 +62,7 @@ export default class DOMManager extends ListWalker<Message> {
|
|||
private stylesManager: StylesManager;
|
||||
private focusManager: FocusManager = new FocusManager(this.vElements);
|
||||
private selectionManager: SelectionManager;
|
||||
private nodeSlots: Map<number, { slotID: number; host: any }> = new Map();
|
||||
private readonly screen: Screen;
|
||||
private readonly isMobile: boolean;
|
||||
private readonly stringDict: Record<number, string>;
|
||||
|
|
@ -278,6 +280,51 @@ export default class DOMManager extends ListWalker<Message> {
|
|||
this.stylesManager.reset();
|
||||
return;
|
||||
}
|
||||
case MType.SetNodeSlot: {
|
||||
const vChild = this.vElements.get(msg.id) || this.vTexts.get(msg.id);
|
||||
if (!vChild) {
|
||||
logger.error('SetNodeSlot: Node not found', msg);
|
||||
return;
|
||||
}
|
||||
if (msg.slotID > 0) {
|
||||
const slotElem = this.vElements.get(msg.slotID);
|
||||
if (!(slotElem instanceof VSlot)) {
|
||||
logger.error('SetNodeSlot: Slot not found', msg);
|
||||
return;
|
||||
}
|
||||
const host = vChild.parentNode;
|
||||
if (host && (vChild as any).assignedSlot !== slotElem) {
|
||||
if (vChild.node.parentNode === (host as any).node) {
|
||||
host.node.removeChild(vChild.node);
|
||||
}
|
||||
slotElem.addAssigned(vChild);
|
||||
(vChild as any).assignedSlot = slotElem;
|
||||
this.nodeSlots.set(msg.id, { slotID: msg.slotID, host });
|
||||
}
|
||||
} else {
|
||||
if (vChild.assignedSlot) {
|
||||
const slotElem = vChild.assignedSlot as VSlot;
|
||||
slotElem.removeAssigned(vChild);
|
||||
if (vChild.parentNode) {
|
||||
const host = vChild.parentNode;
|
||||
const siblings = host['children'] as any[];
|
||||
const index = siblings.indexOf(vChild);
|
||||
let next: Node | null = null;
|
||||
for (let i = index + 1; i < siblings.length; i++) {
|
||||
const sib = siblings[i];
|
||||
if (!sib.assignedSlot) {
|
||||
next = sib.node;
|
||||
break;
|
||||
}
|
||||
}
|
||||
host.node.insertBefore(vChild.node, next);
|
||||
}
|
||||
vChild.assignedSlot = null;
|
||||
this.nodeSlots.delete(msg.id);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
case MType.CreateTextNode: {
|
||||
const vText = new VText();
|
||||
this.vTexts.set(msg.id, vText);
|
||||
|
|
@ -286,7 +333,10 @@ export default class DOMManager extends ListWalker<Message> {
|
|||
}
|
||||
case MType.CreateElementNode: {
|
||||
// if (msg.tag.toLowerCase() === 'canvas') msg.tag = 'video'
|
||||
const vElem = new VElement(msg.tag, msg.svg, msg.index, msg.id);
|
||||
const vElem =
|
||||
msg.tag === 'SLOT'
|
||||
? new VSlot(msg.tag, msg.svg, msg.index, msg.id)
|
||||
: new VElement(msg.tag, msg.svg, msg.index, msg.id);
|
||||
if (['STYLE', 'style', 'LINK'].includes(msg.tag)) {
|
||||
vElem.prioritized = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ type Callback<T> = (o: T) => void;
|
|||
*/
|
||||
export abstract class VNode<T extends Node = Node> {
|
||||
protected abstract createNode(): T;
|
||||
|
||||
assignedSlot: VSlot | null = null;
|
||||
private _node: T | null;
|
||||
|
||||
/**
|
||||
|
|
@ -64,7 +64,7 @@ abstract class VParent<T extends Node = Node> extends VNode<T> {
|
|||
*/
|
||||
protected children: VChild[] = [];
|
||||
|
||||
private notMontedChildren: Set<VChild> = new Set();
|
||||
protected notMontedChildren: Set<VChild> = new Set();
|
||||
|
||||
insertChildAt(child: VChild, index: number) {
|
||||
if (child.parentNode) {
|
||||
|
|
@ -85,6 +85,9 @@ abstract class VParent<T extends Node = Node> extends VNode<T> {
|
|||
let nextMounted: VChild | null = null;
|
||||
for (let i = this.children.length - 1; i >= 0; i--) {
|
||||
const child = this.children[i];
|
||||
if (child.assignedSlot) {
|
||||
continue;
|
||||
}
|
||||
if (
|
||||
this.notMontedChildren.has(child) &&
|
||||
(!shouldInsert || shouldInsert(child)) // is there a better way of not-knowing about subclass logic on prioritized insertion?
|
||||
|
|
@ -112,9 +115,10 @@ abstract class VParent<T extends Node = Node> extends VNode<T> {
|
|||
/* Removing in-between */
|
||||
const { node } = this;
|
||||
const realChildren = node.childNodes;
|
||||
if (realChildren.length > 0 && this.children.length > 0) {
|
||||
for (let j = 0; j < this.children.length; j++) {
|
||||
while (realChildren[j] !== this.children[j].node) {
|
||||
const expected = this.children.filter((c) => !c.assignedSlot);
|
||||
if (realChildren.length > 0 && expected.length > 0) {
|
||||
for (let j = 0; j < expected.length; j++) {
|
||||
while (realChildren[j] !== expected[j].node) {
|
||||
if (isNode(realChildren[j])) {
|
||||
node.removeChild(realChildren[j]);
|
||||
}
|
||||
|
|
@ -122,7 +126,7 @@ abstract class VParent<T extends Node = Node> extends VNode<T> {
|
|||
}
|
||||
}
|
||||
/* Removing tail */
|
||||
while (realChildren.length > this.children.length) {
|
||||
while (realChildren.length > expected.length) {
|
||||
node.removeChild(
|
||||
node.lastChild as Node,
|
||||
); /* realChildren.length > this.children.length >= 0 so it is not null */
|
||||
|
|
@ -151,6 +155,62 @@ export class VDocument extends VParent<Document> {
|
|||
}
|
||||
}
|
||||
|
||||
export class VSlot extends VElement {
|
||||
assignedNodes: VChild[] = [];
|
||||
|
||||
addAssigned(child: VChild) {
|
||||
if (this.assignedNodes.indexOf(child) === -1) {
|
||||
this.assignedNodes.push(child);
|
||||
this.notMontedChildren.add(child);
|
||||
}
|
||||
}
|
||||
|
||||
removeAssigned(child: VChild) {
|
||||
this.assignedNodes = this.assignedNodes.filter((c) => c !== child);
|
||||
this.notMontedChildren.delete(child);
|
||||
}
|
||||
|
||||
private mountAssigned() {
|
||||
let nextMounted: VChild | null = null;
|
||||
for (let i = this.assignedNodes.length - 1; i >= 0; i--) {
|
||||
const child = this.assignedNodes[i];
|
||||
if (this.notMontedChildren.has(child)) {
|
||||
this.node.insertBefore(
|
||||
child.node,
|
||||
nextMounted ? nextMounted.node : null,
|
||||
);
|
||||
this.notMontedChildren.delete(child);
|
||||
}
|
||||
if (!this.notMontedChildren.has(child)) {
|
||||
nextMounted = child;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
applyChanges() {
|
||||
if (this.assignedNodes.length > 0) {
|
||||
this.assignedNodes.forEach((c) => c.applyChanges());
|
||||
this.mountAssigned();
|
||||
const { node } = this;
|
||||
const realChildren = node.childNodes;
|
||||
if (realChildren.length > 0) {
|
||||
for (let j = 0; j < this.assignedNodes.length; j++) {
|
||||
while (realChildren[j] !== this.assignedNodes[j].node) {
|
||||
if (isNode(realChildren[j])) {
|
||||
node.removeChild(realChildren[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
while (realChildren.length > this.assignedNodes.length) {
|
||||
node.removeChild(node.lastChild as Node);
|
||||
}
|
||||
} else {
|
||||
super.applyChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class VShadowRoot extends VParent<ShadowRoot> {
|
||||
constructor(protected readonly createNode: () => ShadowRoot) {
|
||||
super();
|
||||
|
|
|
|||
|
|
@ -547,6 +547,16 @@ export default class RawMessageReader extends PrimitiveReader {
|
|||
};
|
||||
}
|
||||
|
||||
case 65: {
|
||||
const id = this.readUint(); if (id === null) { return resetPointer() }
|
||||
const slotID = this.readUint(); if (slotID === null) { return resetPointer() }
|
||||
return {
|
||||
tp: MType.SetNodeSlot,
|
||||
id,
|
||||
slotID,
|
||||
};
|
||||
}
|
||||
|
||||
case 67: {
|
||||
const id = this.readUint(); if (id === null) { return resetPointer() }
|
||||
const rule = this.readString(); if (rule === null) { return resetPointer() }
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import { MType } from './raw.gen'
|
||||
|
||||
const IOS_TYPES = [90,91,92,93,94,95,96,97,98,100,101,102,103,104,105,106,107,110,111]
|
||||
const DOM_TYPES = [0,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,34,35,37,38,49,50,51,43,52,54,55,57,58,59,60,61,67,68,69,70,71,72,73,74,75,76,77,113,114,117,118,119,122]
|
||||
const DOM_TYPES = [0,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20,34,35,37,38,49,50,51,43,52,54,55,57,58,59,60,61,65,67,68,69,70,71,72,73,74,75,76,77,113,114,117,118,119,122]
|
||||
export function isDOMType(t: MType) {
|
||||
return DOM_TYPES.includes(t)
|
||||
}
|
||||
|
|
@ -48,6 +48,7 @@ import type {
|
|||
RawLongTask,
|
||||
RawSetNodeAttributeURLBased,
|
||||
RawSetCssDataURLBased,
|
||||
RawSetNodeSlot,
|
||||
RawCssInsertRuleURLBased,
|
||||
RawMouseClick,
|
||||
RawMouseClickDeprecated,
|
||||
|
|
@ -178,6 +179,8 @@ export type SetNodeAttributeURLBased = RawSetNodeAttributeURLBased & Timed
|
|||
|
||||
export type SetCssDataURLBased = RawSetCssDataURLBased & Timed
|
||||
|
||||
export type SetNodeSlot = RawSetNodeSlot & Timed
|
||||
|
||||
export type CssInsertRuleURLBased = RawCssInsertRuleURLBased & Timed
|
||||
|
||||
export type MouseClick = RawMouseClick & Timed
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ export const enum MType {
|
|||
LongTask = 59,
|
||||
SetNodeAttributeURLBased = 60,
|
||||
SetCssDataURLBased = 61,
|
||||
SetNodeSlot = 65,
|
||||
CssInsertRuleURLBased = 67,
|
||||
MouseClick = 68,
|
||||
MouseClickDeprecated = 69,
|
||||
|
|
@ -394,6 +395,12 @@ export interface RawSetCssDataURLBased {
|
|||
baseURL: string,
|
||||
}
|
||||
|
||||
export interface RawSetNodeSlot {
|
||||
tp: MType.SetNodeSlot,
|
||||
id: number,
|
||||
slotID: number,
|
||||
}
|
||||
|
||||
export interface RawCssInsertRuleURLBased {
|
||||
tp: MType.CssInsertRuleURLBased,
|
||||
id: number,
|
||||
|
|
@ -703,4 +710,4 @@ export interface RawMobileIssueEvent {
|
|||
}
|
||||
|
||||
|
||||
export type RawMessage = RawTimestamp | RawSetPageLocationDeprecated | RawSetViewportSize | RawSetViewportScroll | RawCreateDocument | RawCreateElementNode | RawCreateTextNode | RawMoveNode | RawRemoveNode | RawSetNodeAttribute | RawRemoveNodeAttribute | RawSetNodeData | RawSetCssData | RawSetNodeScroll | RawSetInputValue | RawSetInputChecked | RawMouseMove | RawNetworkRequestDeprecated | RawConsoleLog | RawStringDictGlobal | RawSetNodeAttributeDictGlobal | RawCssInsertRule | RawCssDeleteRule | RawFetch | RawProfiler | RawOTable | RawReduxDeprecated | RawVuex | RawMobX | RawNgRx | RawGraphQlDeprecated | RawPerformanceTrack | RawStringDictDeprecated | RawSetNodeAttributeDictDeprecated | RawStringDict | RawSetNodeAttributeDict | RawResourceTimingDeprecatedDeprecated | RawConnectionInformation | RawSetPageVisibility | RawLoadFontFace | RawSetNodeFocus | RawLongTask | RawSetNodeAttributeURLBased | RawSetCssDataURLBased | RawCssInsertRuleURLBased | RawMouseClick | RawMouseClickDeprecated | RawCreateIFrameDocument | RawAdoptedSsReplaceURLBased | RawAdoptedSsReplace | RawAdoptedSsInsertRuleURLBased | RawAdoptedSsInsertRule | RawAdoptedSsDeleteRule | RawAdoptedSsAddOwner | RawAdoptedSsRemoveOwner | RawZustand | RawNetworkRequest | RawWsChannel | RawResourceTiming | RawIncident | RawLongAnimationTask | RawSelectionChange | RawMouseThrashing | RawResourceTimingDeprecated | RawTabChange | RawTabData | RawCanvasNode | RawTagTrigger | RawRedux | RawSetPageLocation | RawGraphQl | RawMobileEvent | RawMobileScreenChanges | RawMobileClickEvent | RawMobileInputEvent | RawMobilePerformanceEvent | RawMobileLog | RawMobileInternalError | RawMobileNetworkCall | RawMobileSwipeEvent | RawMobileIssueEvent;
|
||||
export type RawMessage = RawTimestamp | RawSetPageLocationDeprecated | RawSetViewportSize | RawSetViewportScroll | RawCreateDocument | RawCreateElementNode | RawCreateTextNode | RawMoveNode | RawRemoveNode | RawSetNodeAttribute | RawRemoveNodeAttribute | RawSetNodeData | RawSetCssData | RawSetNodeScroll | RawSetInputValue | RawSetInputChecked | RawMouseMove | RawNetworkRequestDeprecated | RawConsoleLog | RawStringDictGlobal | RawSetNodeAttributeDictGlobal | RawCssInsertRule | RawCssDeleteRule | RawFetch | RawProfiler | RawOTable | RawReduxDeprecated | RawVuex | RawMobX | RawNgRx | RawGraphQlDeprecated | RawPerformanceTrack | RawStringDictDeprecated | RawSetNodeAttributeDictDeprecated | RawStringDict | RawSetNodeAttributeDict | RawResourceTimingDeprecatedDeprecated | RawConnectionInformation | RawSetPageVisibility | RawLoadFontFace | RawSetNodeFocus | RawLongTask | RawSetNodeAttributeURLBased | RawSetCssDataURLBased | RawSetNodeSlot | RawCssInsertRuleURLBased | RawMouseClick | RawMouseClickDeprecated | RawCreateIFrameDocument | RawAdoptedSsReplaceURLBased | RawAdoptedSsReplace | RawAdoptedSsInsertRuleURLBased | RawAdoptedSsInsertRule | RawAdoptedSsDeleteRule | RawAdoptedSsAddOwner | RawAdoptedSsRemoveOwner | RawZustand | RawNetworkRequest | RawWsChannel | RawResourceTiming | RawIncident | RawLongAnimationTask | RawSelectionChange | RawMouseThrashing | RawResourceTimingDeprecated | RawTabChange | RawTabData | RawCanvasNode | RawTagTrigger | RawRedux | RawSetPageLocation | RawGraphQl | RawMobileEvent | RawMobileScreenChanges | RawMobileClickEvent | RawMobileInputEvent | RawMobilePerformanceEvent | RawMobileLog | RawMobileInternalError | RawMobileNetworkCall | RawMobileSwipeEvent | RawMobileIssueEvent;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ export const TP_MAP = {
|
|||
59: MType.LongTask,
|
||||
60: MType.SetNodeAttributeURLBased,
|
||||
61: MType.SetCssDataURLBased,
|
||||
65: MType.SetNodeSlot,
|
||||
67: MType.CssInsertRuleURLBased,
|
||||
68: MType.MouseClick,
|
||||
69: MType.MouseClickDeprecated,
|
||||
|
|
|
|||
|
|
@ -372,6 +372,12 @@ type TrCustomIssue = [
|
|||
payload: string,
|
||||
]
|
||||
|
||||
type TrSetNodeSlot = [
|
||||
type: 65,
|
||||
id: number,
|
||||
slotID: number,
|
||||
]
|
||||
|
||||
type TrCSSInsertRuleURLBased = [
|
||||
type: 67,
|
||||
id: number,
|
||||
|
|
@ -621,7 +627,7 @@ type TrWebVitals = [
|
|||
]
|
||||
|
||||
|
||||
export type TrackerMessage = TrTimestamp | TrSetPageLocationDeprecated | TrSetViewportSize | TrSetViewportScroll | TrCreateDocument | TrCreateElementNode | TrCreateTextNode | TrMoveNode | TrRemoveNode | TrSetNodeAttribute | TrRemoveNodeAttribute | TrSetNodeData | TrSetNodeScroll | TrSetInputTarget | TrSetInputValue | TrSetInputChecked | TrMouseMove | TrNetworkRequestDeprecated | TrConsoleLog | TrPageLoadTiming | TrPageRenderTiming | TrCustomEvent | TrUserID | TrUserAnonymousID | TrMetadata | TrStringDictGlobal | TrSetNodeAttributeDictGlobal | TrCSSInsertRule | TrCSSDeleteRule | TrFetch | TrProfiler | TrOTable | TrStateAction | TrReduxDeprecated | TrVuex | TrMobX | TrNgRx | TrGraphQLDeprecated | TrPerformanceTrack | TrStringDictDeprecated | TrSetNodeAttributeDictDeprecated | TrStringDict | TrSetNodeAttributeDict | TrResourceTimingDeprecatedDeprecated | TrConnectionInformation | TrSetPageVisibility | TrLoadFontFace | TrSetNodeFocus | TrLongTask | TrSetNodeAttributeURLBased | TrSetCSSDataURLBased | TrTechnicalInfo | TrCustomIssue | TrCSSInsertRuleURLBased | TrMouseClick | TrMouseClickDeprecated | TrCreateIFrameDocument | TrAdoptedSSReplaceURLBased | TrAdoptedSSInsertRuleURLBased | TrAdoptedSSDeleteRule | TrAdoptedSSAddOwner | TrAdoptedSSRemoveOwner | TrJSException | TrZustand | TrBatchMetadata | TrPartitionedMessage | TrNetworkRequest | TrWSChannel | TrResourceTiming | TrIncident | TrLongAnimationTask | TrInputChange | TrSelectionChange | TrMouseThrashing | TrUnbindNodes | TrResourceTimingDeprecated | TrTabChange | TrTabData | TrCanvasNode | TrTagTrigger | TrRedux | TrSetPageLocation | TrGraphQL | TrWebVitals
|
||||
export type TrackerMessage = TrTimestamp | TrSetPageLocationDeprecated | TrSetViewportSize | TrSetViewportScroll | TrCreateDocument | TrCreateElementNode | TrCreateTextNode | TrMoveNode | TrRemoveNode | TrSetNodeAttribute | TrRemoveNodeAttribute | TrSetNodeData | TrSetNodeScroll | TrSetInputTarget | TrSetInputValue | TrSetInputChecked | TrMouseMove | TrNetworkRequestDeprecated | TrConsoleLog | TrPageLoadTiming | TrPageRenderTiming | TrCustomEvent | TrUserID | TrUserAnonymousID | TrMetadata | TrStringDictGlobal | TrSetNodeAttributeDictGlobal | TrCSSInsertRule | TrCSSDeleteRule | TrFetch | TrProfiler | TrOTable | TrStateAction | TrReduxDeprecated | TrVuex | TrMobX | TrNgRx | TrGraphQLDeprecated | TrPerformanceTrack | TrStringDictDeprecated | TrSetNodeAttributeDictDeprecated | TrStringDict | TrSetNodeAttributeDict | TrResourceTimingDeprecatedDeprecated | TrConnectionInformation | TrSetPageVisibility | TrLoadFontFace | TrSetNodeFocus | TrLongTask | TrSetNodeAttributeURLBased | TrSetCSSDataURLBased | TrTechnicalInfo | TrCustomIssue | TrSetNodeSlot | TrCSSInsertRuleURLBased | TrMouseClick | TrMouseClickDeprecated | TrCreateIFrameDocument | TrAdoptedSSReplaceURLBased | TrAdoptedSSInsertRuleURLBased | TrAdoptedSSDeleteRule | TrAdoptedSSAddOwner | TrAdoptedSSRemoveOwner | TrJSException | TrZustand | TrBatchMetadata | TrPartitionedMessage | TrNetworkRequest | TrWSChannel | TrResourceTiming | TrIncident | TrLongAnimationTask | TrInputChange | TrSelectionChange | TrMouseThrashing | TrUnbindNodes | TrResourceTimingDeprecated | TrTabChange | TrTabData | TrCanvasNode | TrTagTrigger | TrRedux | TrSetPageLocation | TrGraphQL | TrWebVitals
|
||||
|
||||
export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
||||
switch(tMsg[0]) {
|
||||
|
|
@ -1014,6 +1020,14 @@ export default function translate(tMsg: TrackerMessage): RawMessage | null {
|
|||
}
|
||||
}
|
||||
|
||||
case 65: {
|
||||
return {
|
||||
tp: MType.SetNodeSlot,
|
||||
id: tMsg[1],
|
||||
slotID: tMsg[2],
|
||||
}
|
||||
}
|
||||
|
||||
case 67: {
|
||||
return {
|
||||
tp: MType.CssInsertRuleURLBased,
|
||||
|
|
|
|||
|
|
@ -396,7 +396,10 @@ message 64, 'CustomIssue', :replayer => false do
|
|||
string 'Name'
|
||||
string 'Payload'
|
||||
end
|
||||
|
||||
message 65, 'SetNodeSlot' do
|
||||
uint 'ID'
|
||||
uint 'SlotID'
|
||||
end
|
||||
message 66, 'AssetCache', :replayer => false, :tracker => false do
|
||||
string 'URL'
|
||||
end
|
||||
|
|
@ -659,4 +662,4 @@ message 127, 'SessionSearch', :tracker => false, :replayer => false do
|
|||
uint 'Partition'
|
||||
end
|
||||
|
||||
# FREE 2, 35, 36, 65, 87, 88, 89
|
||||
# FREE 2, 35, 36, 87, 88, 89
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ export declare const enum Type {
|
|||
SetCSSDataURLBased = 61,
|
||||
TechnicalInfo = 63,
|
||||
CustomIssue = 64,
|
||||
SetNodeSlot = 65,
|
||||
CSSInsertRuleURLBased = 67,
|
||||
MouseClick = 68,
|
||||
MouseClickDeprecated = 69,
|
||||
|
|
@ -456,6 +457,12 @@ export type CustomIssue = [
|
|||
/*payload:*/ string,
|
||||
]
|
||||
|
||||
export type SetNodeSlot = [
|
||||
/*type:*/ Type.SetNodeSlot,
|
||||
/*id:*/ number,
|
||||
/*slotID:*/ number,
|
||||
]
|
||||
|
||||
export type CSSInsertRuleURLBased = [
|
||||
/*type:*/ Type.CSSInsertRuleURLBased,
|
||||
/*id:*/ number,
|
||||
|
|
@ -705,5 +712,5 @@ export type WebVitals = [
|
|||
]
|
||||
|
||||
|
||||
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 | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecatedDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | ResourceTiming | Incident | LongAnimationTask | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTimingDeprecated | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals
|
||||
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 | CSSInsertRule | CSSDeleteRule | Fetch | Profiler | OTable | StateAction | ReduxDeprecated | Vuex | MobX | NgRx | GraphQLDeprecated | PerformanceTrack | StringDictDeprecated | SetNodeAttributeDictDeprecated | StringDict | SetNodeAttributeDict | ResourceTimingDeprecatedDeprecated | ConnectionInformation | SetPageVisibility | LoadFontFace | SetNodeFocus | LongTask | SetNodeAttributeURLBased | SetCSSDataURLBased | TechnicalInfo | CustomIssue | SetNodeSlot | CSSInsertRuleURLBased | MouseClick | MouseClickDeprecated | CreateIFrameDocument | AdoptedSSReplaceURLBased | AdoptedSSInsertRuleURLBased | AdoptedSSDeleteRule | AdoptedSSAddOwner | AdoptedSSRemoveOwner | JSException | Zustand | BatchMetadata | PartitionedMessage | NetworkRequest | WSChannel | ResourceTiming | Incident | LongAnimationTask | InputChange | SelectionChange | MouseThrashing | UnbindNodes | ResourceTimingDeprecated | TabChange | TabData | CanvasNode | TagTrigger | Redux | SetPageLocation | GraphQL | WebVitals
|
||||
export default Message
|
||||
|
|
|
|||
|
|
@ -686,6 +686,17 @@ export function CustomIssue(
|
|||
]
|
||||
}
|
||||
|
||||
export function SetNodeSlot(
|
||||
id: number,
|
||||
slotID: number,
|
||||
): Messages.SetNodeSlot {
|
||||
return [
|
||||
Messages.Type.SetNodeSlot,
|
||||
id,
|
||||
slotID,
|
||||
]
|
||||
}
|
||||
|
||||
export function CSSInsertRuleURLBased(
|
||||
id: number,
|
||||
rule: string,
|
||||
|
|
|
|||
|
|
@ -222,6 +222,10 @@ export default class MessageEncoder extends PrimitiveEncoder {
|
|||
return this.string(msg[1]) && this.string(msg[2])
|
||||
break
|
||||
|
||||
case Messages.Type.SetNodeSlot:
|
||||
return this.uint(msg[1]) && this.uint(msg[2])
|
||||
break
|
||||
|
||||
case Messages.Type.CSSInsertRuleURLBased:
|
||||
return this.uint(msg[1]) && this.string(msg[2]) && this.uint(msg[3]) && this.string(msg[4])
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue