This is a really weird issue that I found some days ago. I wanted to create a minimal reproducible example before creating an issue... But I couldn't, so I just cut what I can.
As written in the title, sometimes document properties aren't assigned, here is a video demonstrating the issue:
Here is the example code:
test.zip
Fun fact: Adding document_ = document
at the top of test.js
seems to cause the bug to not happen anymore.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too