Christian Selig on Nostr: Web dev question: I'm having a weird issue where I add an eventListener to a YouTube ...
Web dev question: I'm having a weird issue where I add an eventListener to a YouTube element, event properly fires, but if within the event I add a setInterval, the interval temporarily stops while ads play, and resumes after. How? setInterval was clearly "queued up" properly since it starts/stops, and I thought it was independent of the element?
Am I just not understanding event listeners? 😛
Published at
2024-03-11 20:06:45Event JSON
{
"id": "9d2fbb56585e5af5dec4f5f7aa1a9102a4171063557a8db89e426e369d509462",
"pubkey": "de6adda4d139627ce8f9cf05ef27c7cd1de9895363e5f303667f761bec318716",
"created_at": 1710187605,
"kind": 1,
"tags": [
[
"proxy",
"https://mastodon.social/users/christianselig/statuses/112078854889847233",
"activitypub"
]
],
"content": "Web dev question: I'm having a weird issue where I add an eventListener to a YouTube element, event properly fires, but if within the event I add a setInterval, the interval temporarily stops while ads play, and resumes after. How? setInterval was clearly \"queued up\" properly since it starts/stops, and I thought it was independent of the element?\n\nAm I just not understanding event listeners? 😛\n\nhttps://files.mastodon.social/media_attachments/files/112/078/854/621/006/800/original/c64fc494b9a454eb.png",
"sig": "3816acf5c588c2f6902ef61317e0aa07049ecef3b577443f8c4661fa71cd6ba1d32c9511d2d11d25b26e2c8ce564f462beab55f558cb8e34a4abbe2c482f0176"
}