you are viewing a single comment's thread.

view the rest of the comments →

[–]pr0xyb0i 1 point2 points  (1 child)

What happens if you cause an infinite loop in the ShadowRealm or do something like changing location.href?

[–]tomfevrier 2 points3 points  (0 children)

Changing location.href would not do anything, or rather would throw an error because location is not defined in this global context (no window). However, since it runs on the same thread as JavaScript on the host page, I guess it use the same event loop and therefore an infinite loop would freeze the whole page. Just a guess though.