Closed kaeevans closed 4 months ago
This could fix the error:
That fixed it but the simpler solution was using this catch all:
if (window.trustedTypes && window.trustedTypes.createPolicy) {
window.trustedTypes.createPolicy("default", {
createHTML: (string) => string,
createScriptURL: (string) => string,
createScript: (string) => string,
});
}
That fixed it but the simpler solution was using this catch all:
if (window.trustedTypes && window.trustedTypes.createPolicy) { window.trustedTypes.createPolicy("default", { createHTML: (string) => string, createScriptURL: (string) => string, createScript: (string) => string, }); }
Thank you for that, I was having a similar issue calling add_toolbar_button()
with this error:
jquery.module.min.js:2 Uncaught TypeError: Illegal invocation
at T.fn.init.<anonymous> (jquery.module.min.js:2:44823)
at Y (jquery.module.min.js:2:6326)
at T.fn.init.html (jquery.module.min.js:2:44634)
at create_generic_toolbar_button (gmail.js:3673:16)
at Gmail.api.tools.add_toolbar_button (gmail.js:3690:16)
at extension.js:40:29
I get this console error when I call compose.body("my reply") for a reply compose box: