Video yükleniyor...
Video Yüklenemedi
Design Engineering Tip: Moving a playing embed to another spot with appendChild restarts it. The iframe is removed, then inserted again. moveBefore() moves it, and it keeps playing: if ("moveBefore" in slot) slot.moveBefore(player, null) else slot.insertBefore(player, null)
17,129 görüntüleme • 9 gün önce •via X (Twitter)
7 Yorum

Todels ☁9 gün önce
you should make an entire article where you write all engineering tips or claude skill

Zafar9 gün önce
Wouldn’t picture-in-picture do the trick instead?

Griz9 gün önce
does moveBefore work in safari yet or is it chrome only for now?

Code Hz9 gün önce
or you can use view-transition

Sam9 gün önce
did not know moveBefore was a thing yet, this is super useful actually. saves so much state headache

יוסי9 gün önce
Claude knowns it already haha

Pablo Manjarres9 gün önce
finally, move nodes without killing playback

