Page 1 of 1

TypeError: can't access property "ownerDocument", el is null

Posted: Sat Dec 17, 2022 6:10 pm
by barbaz
This is not new behavior, but I haven't been able to reproduce it consistently (and still can't reproduce it in a clean profile), and only just now had an idea of where this might be coming from:

In Firefox I use Backspace key to go back (about:config > browser.backspace_action set to 0). Sometimes that results in this message from NoScript code, in both Browser Console and the Terminal in which Firefox is running -

Code: Select all

TypeError: can't access property "ownerDocument", el is null onScriptDisabled.js:66:17
    onScriptDisabled moz-extension://********-****-****-****-************/content/onScriptDisabled.js:66
I wonder if this line https://github.com/hackademix/noscript/ ... led.js#L63 maybe being interpreted as

Code: Select all

    if ((el && ev.code === "Delete") || ev.code === "Backspace") {
https://developer.mozilla.org/en-US/doc ... ence#table would seem to confirm this theory, as does trying it in Web Console -

Code: Select all

>> null && false || true
true
>> null && (false || true)
null

Re: TypeError: can't access property "ownerDocument", el is null

Posted: Sat Dec 17, 2022 7:11 pm
by Giorgio Maone
Good catch, it's a bug indeed, thank you!