Alert is not shown, the document.body of the page is a frameset element (which is being deprecated), and it appears that an alert iframe appended to it is not being displayed.
I missed the fact that document.body can be a frameset node. MDN states that document.body can be eitherbody or frameset node.
In light of the above, there are several places where we use document.body's tag name to determine if a node is body, and such places need to be adjusted to include frameset case if necessary, or otherwise I have to leave a comment on why frameset case is not applicable.
Source We have 2 problems here,
document.body
of the page is aframeset
element (which is being deprecated), and it appears that an alert iframe appended to it is not being displayed. I missed the fact thatdocument.body
can be aframeset
node. MDN states thatdocument.body
can be eitherbody
orframeset
node.document.body
's tag name to determine if a node isbody
, and such places need to be adjusted to includeframeset
case if necessary, or otherwise I have to leave a comment on whyframeset
case is not applicable.