å¤é¨ã¹ã¯ãªããã®èªã¿è¾¼ã¿ var Foo = "foo"; var Bar = "bar"; // å¤é¨ã¹ã¯ãªããèªã¿è¾¼ã¿ var source = readFile("d:\\script.js", "UTF-8"); // å¤é¨ã¹ã¯ãªããå®è¡ var sandbox = new Components.utils.Sandbox(window); sandbox.__proto__ = window; Components.utils.evalInSandbox(source, sandbox); // å¤é¨ã¹ã¯ãªããã®å®è¡çµæãåå¾ sandbox.__proto__ = {}; for(let[key, value] in sandbox){ if(key == "Bar") continue; // Bar ã®ä¸æ¸ããæå¦ window[key] = value; } print(
{{#tags}}- {{label}}
{{/tags}}