@oh-my-pi/pi-coding-agent 16.1.8 → 16.1.9
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/CHANGELOG.md +25 -0
- package/dist/cli.js +4621 -3814
- package/dist/types/cli/flag-tables.d.ts +17 -0
- package/dist/types/cli-commands.d.ts +4 -2
- package/dist/types/modes/controllers/command-controller.d.ts +1 -1
- package/dist/types/modes/interactive-mode.d.ts +1 -1
- package/dist/types/modes/types.d.ts +1 -1
- package/dist/types/session/agent-session.d.ts +13 -0
- package/dist/types/tools/browser/launch.d.ts +5 -0
- package/package.json +12 -12
- package/src/cli/args.ts +0 -1
- package/src/cli/flag-tables.ts +42 -0
- package/src/cli/profile-bootstrap.ts +1 -11
- package/src/cli-commands.ts +48 -3
- package/src/config/model-registry.ts +6 -7
- package/src/internal-urls/docs-index.generated.txt +1 -1
- package/src/lsp/client.ts +39 -25
- package/src/modes/controllers/command-controller.ts +18 -3
- package/src/modes/controllers/mcp-command-controller.ts +40 -12
- package/src/modes/interactive-mode.ts +1 -1
- package/src/modes/types.ts +1 -1
- package/src/session/agent-session.ts +36 -1
- package/src/slash-commands/builtin-registry.ts +24 -66
- package/src/tools/browser/launch.ts +107 -31
- package/src/tools/puppeteer/00_stealth_tampering.txt +16 -35
- package/src/tools/puppeteer/01_stealth_activity.txt +79 -19
- package/src/tools/puppeteer/02_stealth_hairline.txt +57 -11
- package/src/tools/puppeteer/03_stealth_botd.txt +10 -14
- package/src/tools/puppeteer/04_stealth_iframe.txt +156 -63
- package/src/tools/puppeteer/05_stealth_webgl.txt +222 -64
- package/src/tools/puppeteer/06_stealth_screen.txt +255 -67
- package/src/tools/puppeteer/07_stealth_fonts.txt +17 -15
- package/src/tools/puppeteer/08_stealth_audio.txt +32 -20
- package/src/tools/puppeteer/09_stealth_locale.txt +45 -40
- package/src/tools/puppeteer/10_stealth_plugins.txt +12 -8
- package/src/tools/puppeteer/11_stealth_hardware.txt +57 -6
- package/src/tools/puppeteer/12_stealth_codecs.txt +20 -18
- package/src/tools/puppeteer/13_stealth_worker.txt +206 -45
|
@@ -1,20 +1,80 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
{
|
|
2
|
+
const visibilityDescriptors = Object_getOwnPropertyDescriptors({
|
|
3
|
+
get hidden() {
|
|
4
|
+
return false;
|
|
5
|
+
},
|
|
6
|
+
get visibilityState() {
|
|
7
|
+
return "visible";
|
|
8
|
+
},
|
|
9
|
+
get webkitHidden() {
|
|
10
|
+
return false;
|
|
11
|
+
},
|
|
12
|
+
get webkitVisibilityState() {
|
|
13
|
+
return "visible";
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
for (const key of Object_keys(visibilityDescriptors)) {
|
|
17
|
+
const descriptor = visibilityDescriptors[key];
|
|
18
|
+
if (descriptor && typeof descriptor.get === "function") {
|
|
19
|
+
patchToString(descriptor.get, "get " + key);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const focusDescriptor = Object_getOwnPropertyDescriptor(
|
|
23
|
+
{
|
|
24
|
+
hasFocus() {
|
|
25
|
+
return document.visibilityState === "visible";
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
"hasFocus",
|
|
29
|
+
);
|
|
30
|
+
if (focusDescriptor && typeof focusDescriptor.value === "function") {
|
|
31
|
+
patchToString(focusDescriptor.value, "hasFocus");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const clearOwnSlot = (name) => {
|
|
35
|
+
const ownDescriptor = Object_getOwnPropertyDescriptor(document, name);
|
|
36
|
+
if (!ownDescriptor) return true;
|
|
37
|
+
if (ownDescriptor.configurable !== true) return false;
|
|
38
|
+
return Reflect_deleteProperty(document, name);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const inheritedSlot = (name, expectedKind) => {
|
|
42
|
+
let proto = Object_getPrototypeOf(document);
|
|
43
|
+
while (proto) {
|
|
44
|
+
const descriptor = Object_getOwnPropertyDescriptor(proto, name);
|
|
45
|
+
if (descriptor && typeof descriptor[expectedKind] === "function") {
|
|
46
|
+
return [proto, descriptor];
|
|
47
|
+
}
|
|
48
|
+
proto = Object_getPrototypeOf(proto);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const defineAccessor = (name) => {
|
|
53
|
+
if (!clearOwnSlot(name)) return;
|
|
54
|
+
const slot = inheritedSlot(name, "get");
|
|
55
|
+
if (!slot || slot[1].configurable !== true) return;
|
|
56
|
+
|
|
57
|
+
Object_defineProperty(slot[0], name, {
|
|
58
|
+
get: visibilityDescriptors[name].get,
|
|
59
|
+
enumerable: slot[1].enumerable,
|
|
60
|
+
configurable: true,
|
|
7
61
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
defineAccessor("hidden");
|
|
65
|
+
defineAccessor("visibilityState");
|
|
66
|
+
defineAccessor("webkitHidden");
|
|
67
|
+
defineAccessor("webkitVisibilityState");
|
|
68
|
+
|
|
69
|
+
if (clearOwnSlot("hasFocus")) {
|
|
70
|
+
const slot = inheritedSlot("hasFocus", "value");
|
|
71
|
+
if (slot && slot[1].configurable === true) {
|
|
72
|
+
Object_defineProperty(slot[0], "hasFocus", {
|
|
73
|
+
value: focusDescriptor.value,
|
|
74
|
+
writable: slot[1].writable === true,
|
|
75
|
+
enumerable: slot[1].enumerable,
|
|
76
|
+
configurable: true,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -1,11 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
{
|
|
2
|
+
const htmlElementOffsetHeightDescriptor =
|
|
3
|
+
typeof HTMLElement === "undefined"
|
|
4
|
+
? undefined
|
|
5
|
+
: Object_getOwnPropertyDescriptor(HTMLElement.prototype, "offsetHeight");
|
|
6
|
+
const htmlDivElementOffsetHeightDescriptor =
|
|
7
|
+
typeof HTMLDivElement === "undefined"
|
|
8
|
+
? undefined
|
|
9
|
+
: Object_getOwnPropertyDescriptor(HTMLDivElement.prototype, "offsetHeight");
|
|
10
|
+
const offsetHeightDescriptor =
|
|
11
|
+
htmlDivElementOffsetHeightDescriptor || htmlElementOffsetHeightDescriptor;
|
|
12
|
+
const offsetHeightPrototype = htmlDivElementOffsetHeightDescriptor
|
|
13
|
+
? HTMLDivElement.prototype
|
|
14
|
+
: htmlElementOffsetHeightDescriptor
|
|
15
|
+
? HTMLElement.prototype
|
|
16
|
+
: undefined;
|
|
17
|
+
const elementIdDescriptor =
|
|
18
|
+
typeof Element === "undefined"
|
|
19
|
+
? undefined
|
|
20
|
+
: Object_getOwnPropertyDescriptor(Element.prototype, "id");
|
|
21
|
+
|
|
22
|
+
if (
|
|
23
|
+
typeof HTMLDivElement !== "undefined" &&
|
|
24
|
+
offsetHeightPrototype &&
|
|
25
|
+
offsetHeightDescriptor &&
|
|
26
|
+
typeof offsetHeightDescriptor.get === "function" &&
|
|
27
|
+
offsetHeightDescriptor.configurable &&
|
|
28
|
+
elementIdDescriptor &&
|
|
29
|
+
typeof elementIdDescriptor.get === "function"
|
|
30
|
+
) {
|
|
31
|
+
const offsetHeightGetter = new Window_Proxy(offsetHeightDescriptor.get, {
|
|
32
|
+
apply(target, thisArg, args) {
|
|
33
|
+
const height = Reflect_apply(target, thisArg, args);
|
|
34
|
+
|
|
35
|
+
if (
|
|
36
|
+
height === 0 &&
|
|
37
|
+
Object_getPrototypeOf(thisArg) === HTMLDivElement.prototype &&
|
|
38
|
+
Reflect_apply(elementIdDescriptor.get, thisArg, []) === "modernizr"
|
|
39
|
+
) {
|
|
40
|
+
return 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return height;
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
patchToString(offsetHeightGetter, "get offsetHeight");
|
|
48
|
+
|
|
49
|
+
Object_defineProperty(
|
|
50
|
+
offsetHeightPrototype,
|
|
51
|
+
"offsetHeight",
|
|
52
|
+
Object_assign({}, offsetHeightDescriptor, {
|
|
53
|
+
get: offsetHeightGetter,
|
|
54
|
+
}),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
const makeNativeString = (name) => "function " + (name || "") + "() { [native code] }";
|
|
2
|
-
const patchToString = (fn, name) => {
|
|
3
|
-
if (typeof fn !== "function") return;
|
|
4
|
-
Object_defineProperty(fn, "toString", {
|
|
5
|
-
value: function toString() {
|
|
6
|
-
return makeNativeString(name);
|
|
7
|
-
},
|
|
8
|
-
writable: false,
|
|
9
|
-
configurable: true,
|
|
10
|
-
enumerable: false,
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
1
|
|
|
14
2
|
// Ensure navigator.webdriver behaves like real Chrome
|
|
15
3
|
if (navigator.webdriver !== false && navigator.webdriver !== undefined) {
|
|
@@ -356,13 +344,19 @@ if (window.chrome && !("runtime" in window.chrome) && isSecureOrigin) {
|
|
|
356
344
|
// Suppress Permission.query for automation-controlled
|
|
357
345
|
if (navigator.permissions?.query) {
|
|
358
346
|
if (isSecureOrigin && "Notification" in window) {
|
|
347
|
+
const notificationPermissionGetter = Object_getOwnPropertyDescriptor({
|
|
348
|
+
get permission() {
|
|
349
|
+
return "default";
|
|
350
|
+
},
|
|
351
|
+
}, "permission").get;
|
|
352
|
+
patchToString(notificationPermissionGetter, "get permission");
|
|
359
353
|
Object_defineProperty(Notification, "permission", {
|
|
360
|
-
get:
|
|
354
|
+
get: notificationPermissionGetter,
|
|
361
355
|
configurable: true,
|
|
362
356
|
});
|
|
363
357
|
} else if (!isSecureOrigin) {
|
|
364
358
|
const originalQuery = navigator.permissions.query;
|
|
365
|
-
|
|
359
|
+
const patchedPermissionsQuery = function query(parameters) {
|
|
366
360
|
if (parameters?.name === "notifications") {
|
|
367
361
|
const status = { state: "denied", onchange: null };
|
|
368
362
|
if (typeof PermissionStatus !== "undefined") {
|
|
@@ -372,6 +366,8 @@ if (navigator.permissions?.query) {
|
|
|
372
366
|
}
|
|
373
367
|
return originalQuery.call(this, parameters);
|
|
374
368
|
};
|
|
369
|
+
patchToString(patchedPermissionsQuery, "query");
|
|
370
|
+
navigator.permissions.query = patchedPermissionsQuery;
|
|
375
371
|
}
|
|
376
372
|
}
|
|
377
373
|
|
|
@@ -1,81 +1,174 @@
|
|
|
1
|
+
const iframeWindowProxies = new WeakMap();
|
|
2
|
+
|
|
3
|
+
const isFrameIndexKey = (key) => {
|
|
4
|
+
if (typeof key !== "string" || key === "") return false;
|
|
5
|
+
const number = +key;
|
|
6
|
+
return number >= 0 && number < 4294967295 && Math_floor(number) === number && `${number}` === key;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const getPropertyDescriptor = (object, key) => {
|
|
10
|
+
let current = object;
|
|
11
|
+
while (current) {
|
|
12
|
+
const descriptor = Object_getOwnPropertyDescriptor(current, key);
|
|
13
|
+
if (descriptor) return descriptor;
|
|
14
|
+
current = Object_getPrototypeOf(current);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const descriptorWithValue = (target, key, value, writable) => {
|
|
19
|
+
const descriptor = Reflect_getOwnPropertyDescriptor(target, key);
|
|
20
|
+
if (descriptor && descriptor.configurable === false) return descriptor;
|
|
21
|
+
const next = descriptor ? Object_assign({}, descriptor) : { configurable: true, enumerable: true };
|
|
22
|
+
Reflect_deleteProperty(next, "get");
|
|
23
|
+
Reflect_deleteProperty(next, "set");
|
|
24
|
+
next.value = value;
|
|
25
|
+
if (!Reflect_has(next, "writable")) next.writable = writable;
|
|
26
|
+
return next;
|
|
27
|
+
};
|
|
28
|
+
const iframeContentWindowDescriptor =
|
|
29
|
+
typeof HTMLIFrameElement === "undefined"
|
|
30
|
+
? undefined
|
|
31
|
+
: getPropertyDescriptor(HTMLIFrameElement.prototype, "contentWindow");
|
|
32
|
+
const iframeSrcdocDescriptor =
|
|
33
|
+
typeof HTMLIFrameElement === "undefined"
|
|
34
|
+
? undefined
|
|
35
|
+
: getPropertyDescriptor(HTMLIFrameElement.prototype, "srcdoc");
|
|
36
|
+
|
|
37
|
+
const getNativeContentWindow = (iframe) => {
|
|
38
|
+
if (iframeContentWindowDescriptor && iframeContentWindowDescriptor.get) {
|
|
39
|
+
return Reflect_apply(iframeContentWindowDescriptor.get, iframe, []);
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
1
44
|
const addContentWindowProxy = (iframe) => {
|
|
45
|
+
let state = Reflect_apply(Page_WeakMap_get, iframeWindowProxies, [iframe]);
|
|
46
|
+
if (state) return state.proxy;
|
|
47
|
+
|
|
48
|
+
state = { proxy: undefined, target: undefined, wasConnected: false, setProxyTarget: undefined };
|
|
49
|
+
|
|
50
|
+
const isDiscarded = () => {
|
|
51
|
+
if (iframe.isConnected) state.wasConnected = true;
|
|
52
|
+
return state.wasConnected && !iframe.isConnected;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const currentFrameElement = () => {
|
|
56
|
+
if (iframe.isConnected) {
|
|
57
|
+
state.wasConnected = true;
|
|
58
|
+
return iframe;
|
|
59
|
+
}
|
|
60
|
+
return state.wasConnected ? null : iframe;
|
|
61
|
+
};
|
|
62
|
+
|
|
2
63
|
const contentWindowProxy = {
|
|
3
64
|
get(target, key) {
|
|
4
|
-
if (key === "self") return
|
|
5
|
-
if (key === "frameElement") return
|
|
6
|
-
if (key === "
|
|
65
|
+
if (key === "self" || key === "window" || key === "frames" || key === "globalThis") return state.proxy;
|
|
66
|
+
if (key === "frameElement") return currentFrameElement();
|
|
67
|
+
if (key === "closed" && isDiscarded()) return true;
|
|
68
|
+
if (isFrameIndexKey(key)) return undefined;
|
|
69
|
+
if (key === "length") return 0;
|
|
7
70
|
return Reflect_get(target, key);
|
|
8
71
|
},
|
|
72
|
+
getOwnPropertyDescriptor(target, key) {
|
|
73
|
+
if (key === "self" || key === "window" || key === "frames" || key === "globalThis") {
|
|
74
|
+
return descriptorWithValue(target, key, state.proxy, true);
|
|
75
|
+
}
|
|
76
|
+
if (key === "frameElement") {
|
|
77
|
+
return descriptorWithValue(target, key, currentFrameElement(), false);
|
|
78
|
+
}
|
|
79
|
+
if (key === "closed" && isDiscarded()) {
|
|
80
|
+
return descriptorWithValue(target, key, true, false);
|
|
81
|
+
}
|
|
82
|
+
if (isFrameIndexKey(key)) return undefined;
|
|
83
|
+
if (key === "length") return descriptorWithValue(target, key, 0, false);
|
|
84
|
+
return Reflect_getOwnPropertyDescriptor(target, key);
|
|
85
|
+
},
|
|
86
|
+
has(target, key) {
|
|
87
|
+
if (key === "self" || key === "window" || key === "frames" || key === "globalThis" || key === "frameElement") return true;
|
|
88
|
+
if (isFrameIndexKey(key)) return false;
|
|
89
|
+
return Reflect_has(target, key);
|
|
90
|
+
},
|
|
91
|
+
ownKeys(target) {
|
|
92
|
+
const keys = Reflect_ownKeys(target);
|
|
93
|
+
const filtered = [];
|
|
94
|
+
for (let index = 0; index < keys.length; index++) {
|
|
95
|
+
if (!isFrameIndexKey(keys[index])) filtered.push(keys[index]);
|
|
96
|
+
}
|
|
97
|
+
return filtered;
|
|
98
|
+
},
|
|
9
99
|
};
|
|
10
100
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
};
|
|
101
|
+
const setProxyTarget = (target) => {
|
|
102
|
+
if (state.target === target && state.proxy) return state.proxy;
|
|
103
|
+
state.target = target;
|
|
104
|
+
state.proxy = new Window_Proxy(target, contentWindowProxy);
|
|
105
|
+
return state.proxy;
|
|
106
|
+
};
|
|
107
|
+
state.setProxyTarget = setProxyTarget;
|
|
108
|
+
const initialContentWindow = getNativeContentWindow(iframe);
|
|
109
|
+
if (initialContentWindow) setProxyTarget(initialContentWindow);
|
|
110
|
+
if (iframe.isConnected) state.wasConnected = true;
|
|
111
|
+
Reflect_apply(Page_WeakMap_set, iframeWindowProxies, [iframe, state]);
|
|
25
112
|
|
|
26
|
-
const handleIframeCreation = (target, thisArg, args) => {
|
|
27
|
-
const iframe = Reflect_apply(target, thisArg, args);
|
|
28
|
-
const originalIframe = iframe;
|
|
29
|
-
const originalSrcdoc = originalIframe.srcdoc;
|
|
30
113
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
114
|
+
return state.proxy;
|
|
115
|
+
};
|
|
116
|
+
if (
|
|
117
|
+
iframeContentWindowDescriptor &&
|
|
118
|
+
iframeContentWindowDescriptor.get &&
|
|
119
|
+
iframeContentWindowDescriptor.configurable !== false
|
|
120
|
+
) {
|
|
121
|
+
const contentWindowAccessors = {
|
|
122
|
+
get contentWindow() {
|
|
123
|
+
const state = Reflect_apply(Page_WeakMap_get, iframeWindowProxies, [this]);
|
|
124
|
+
if (!state) return getNativeContentWindow(this);
|
|
125
|
+
if (this.isConnected) state.wasConnected = true;
|
|
126
|
+
if (state.wasConnected && !this.isConnected) return null;
|
|
127
|
+
const nativeContentWindow = getNativeContentWindow(this);
|
|
128
|
+
if (!nativeContentWindow) return nativeContentWindow;
|
|
129
|
+
return state.setProxyTarget(nativeContentWindow);
|
|
44
130
|
},
|
|
131
|
+
};
|
|
132
|
+
const contentWindowGetter = Object_getOwnPropertyDescriptor(contentWindowAccessors, "contentWindow").get;
|
|
133
|
+
patchToString(contentWindowGetter, "get contentWindow");
|
|
134
|
+
Object_defineProperty(HTMLIFrameElement.prototype, "contentWindow", {
|
|
135
|
+
get: contentWindowGetter,
|
|
136
|
+
set: iframeContentWindowDescriptor.set,
|
|
137
|
+
enumerable: iframeContentWindowDescriptor.enumerable,
|
|
138
|
+
configurable: iframeContentWindowDescriptor.configurable,
|
|
45
139
|
});
|
|
140
|
+
}
|
|
46
141
|
|
|
47
|
-
return iframe;
|
|
48
|
-
};
|
|
49
142
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
143
|
+
if (
|
|
144
|
+
iframeSrcdocDescriptor &&
|
|
145
|
+
iframeSrcdocDescriptor.configurable !== false
|
|
146
|
+
) {
|
|
147
|
+
const srcdocAccessors = {
|
|
148
|
+
get srcdoc() {
|
|
149
|
+
if (iframeSrcdocDescriptor.get) {
|
|
150
|
+
return Reflect_apply(iframeSrcdocDescriptor.get, this, []);
|
|
57
151
|
}
|
|
58
|
-
|
|
152
|
+
const value = this.getAttribute("srcdoc");
|
|
153
|
+
return value === null ? "" : value;
|
|
59
154
|
},
|
|
60
|
-
|
|
61
|
-
|
|
155
|
+
set srcdoc(newValue) {
|
|
156
|
+
addContentWindowProxy(this);
|
|
157
|
+
if (iframeSrcdocDescriptor.set) {
|
|
158
|
+
return Reflect_apply(iframeSrcdocDescriptor.set, this, [newValue]);
|
|
159
|
+
}
|
|
160
|
+
return this.setAttribute("srcdoc", newValue);
|
|
62
161
|
},
|
|
63
162
|
};
|
|
64
|
-
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
configurable: true,
|
|
75
|
-
enumerable: false,
|
|
163
|
+
const srcdocDescriptor = Object_getOwnPropertyDescriptor(srcdocAccessors, "srcdoc");
|
|
164
|
+
const srcdocGetter = srcdocDescriptor.get;
|
|
165
|
+
const srcdocSetter = srcdocDescriptor.set;
|
|
166
|
+
patchToString(srcdocGetter, "get srcdoc");
|
|
167
|
+
patchToString(srcdocSetter, "set srcdoc");
|
|
168
|
+
Object_defineProperty(HTMLIFrameElement.prototype, "srcdoc", {
|
|
169
|
+
get: srcdocGetter,
|
|
170
|
+
set: srcdocSetter,
|
|
171
|
+
enumerable: iframeSrcdocDescriptor.enumerable,
|
|
172
|
+
configurable: iframeSrcdocDescriptor.configurable,
|
|
76
173
|
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
try {
|
|
80
|
-
addIframeCreationSniffer();
|
|
81
|
-
} catch {}
|
|
174
|
+
}
|