-
Notifications
You must be signed in to change notification settings - Fork 315
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
在grant unsafeWindow后,即使使用window也可以访问inject页面本身的window对象,与油🐒脚本管理器的表现不一致,不知是否符合预期。
// ==UserScript==
// @name New Userscript
// @namespace https://bbs.tampermonkey.net.cn/
// @version 0.1.0
// @description try to take over the world!
// @author You
// @match https://quilljs.com/playground/snow
// @grant unsafeWindow
// ==/UserScript==
(function() {
'use strict';
console.log(window === unsafeWindow);
console.log("window", "------", window.Quill)
console.log("unsafeWindow", "------", unsafeWindow.Quill)
// Your code here...
})();加入脚本后访问https://quilljs.com/playground/snow,即使window已经是被代理而非原始window,但仍可以发现在window上也可以访问到Quill对象。

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working