You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Please fill out the issue template with your details)
Expected Behavior
The behavior of JavaScript methods can be rewritten.
Actual Behavior
If the JavaScript is imported with type=module, it cannot be referenced or rewritten, Removing type=module allows it to be referenced and rewritten.
Code example:<script type="module" src="testjs.js"/>
jscode:
function testfun1() {
alert(1111);
}
Specifications
Chromium: ( 131.0.6778.85)
TM: (i.e. 5.3.2)
OS: (i.e. linux ubntu)
Script
(Please give an example of the script if applicable.)
// ==UserScript==// @name MyName// @namespace http://mywebsite.com// @Version 1.0// @description try to take over the world!// @author Me// @match http://mywebsite.com/*// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js// @include https://mywebsite.com/*// @grant none// ==/UserScript==
window.addEventListener('load', () => {
var fun = window.testfun1;
alert(fun); //Allways alert undefine
});
The text was updated successfully, but these errors were encountered:
(Please fill out the issue template with your details)
Expected Behavior
The behavior of JavaScript methods can be rewritten.
Actual Behavior
If the JavaScript is imported with type=module, it cannot be referenced or rewritten, Removing type=module allows it to be referenced and rewritten.
Code example:<script type="module" src="testjs.js"/>
jscode:
function testfun1() {
alert(1111);
}
Specifications
Script
(Please give an example of the script if applicable.)
window.addEventListener('load', () => {
var fun = window.testfun1;
alert(fun); //Allways alert undefine
});
The text was updated successfully, but these errors were encountered: