MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / restorePageProps

Function restorePageProps

example/tests/sandbox_test.js:140–149  ·  view source on GitHub ↗
(snapshots)

Source from the content-addressed store, hash-verified

138 }
139
140 function restorePageProps(snapshots) {
141 for (const key of Object.keys(snapshots)) {
142 const desc = snapshots[key];
143 if (desc) {
144 Object.defineProperty(unsafeWindow, key, desc);
145 } else {
146 delete unsafeWindow[key];
147 }
148 }
149 }
150
151 section("沙盒全局身份");
152

Callers 1

sandbox_test.jsFile · 0.85

Calls 1

keysMethod · 0.80

Tested by

no test coverage detected