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

Bug reports and enhancement requests
Post Reply
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

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

Post 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
*Always* check the changelogs BEFORE updating that important software!
-
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

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

Post by Giorgio Maone »

Good catch, it's a bug indeed, thank you!
Mozilla/5.0 (X11; Linux x86_64; rv:107.0) Gecko/20100101 Firefox/107.0
Post Reply