MCPcopy Create free account
hub / github.com/Tampermonkey/tampermonkey / wrap

Function wrap

src/content.js:653–674  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

651 var arr = [ window['HTMLElement'].prototype, document.__proto__ ];
652 for (var o=0; o < arr.length; o++) {
653 var wrap = function() {
654 var k = arr[o];
655 var obj = Object.getOwnPropertyDescriptor(k, 'wrappedJSObject');
656
657 if (!obj) {
658 var prop = { 'wrappedJSObject':
659 {
660 get: function() {
661 return this;
662 },
663 enumerable: false,
664 configurable: true
665 },
666 };
667 Object.defineProperties(k, prop);
668
669 Clean.push(function() {
670 if (CV) console.log("clean: " + Helper.toType(k) + "[wrappedJSObject]");
671 delete k['wrappedJSObject'];
672 });
673 }
674 };
675 wrap();
676 }
677};

Callers 1

wrappedJSObjectFixFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…