Open Karuljonnai opened 7 months ago
On my SO post
That link seems broken.
Which browser version are you finding this in?
However probably checking if the interface is there is a good idea anyway.
I updated the link. I'm on Kubuntu 22.04, Firefox 123.0, NoScript 11.4.29
Is the i
variable numeric (i.e. "0")?
Yes, .map
enumerates the results
with the 2nd argument i
.
Yes,
.map
enumerates theresults
with the 2nd argumenti
.
Then what is happening is quite clear: you're adding your elements as window[number], which would normally reference subframes' window objects (where HTMLFrameElement is defined - deprecation is not the issue here).
Fortunately this cannot alias the actual window objects (meant to be wrapped) if they're present, and your code won't break anyway because the exception is just logged, not rethrown, but that's annoying nonetheless, if nothing else because of the console noise.
Therefore I'm fixing this in next NoScript version, thanks.
On my SO post, I enter in detail on how I got a bug because of NoScript. But, basically, on
patchWindow.js:291
, it's using a deprecated interfaceHTMLFrameElement
, which throws anTypeError: win[(("HTML" + (intermediate value)) + "Element")] is undefined