Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

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 ☁ profil fotoğrafı
Todels ☁9 gün önce

you should make an entire article where you write all engineering tips or claude skill

Zafar profil fotoğrafı
Zafar9 gün önce

Wouldn’t picture-in-picture do the trick instead?

Griz profil fotoğrafı
Griz9 gün önce

does moveBefore work in safari yet or is it chrome only for now?

Code Hz profil fotoğrafı
Code Hz9 gün önce

or you can use view-transition

Sam profil fotoğrafı
Sam9 gün önce

did not know moveBefore was a thing yet, this is super useful actually. saves so much state headache

יוסי profil fotoğrafı
יוסי9 gün önce

Claude knowns it already haha

Pablo Manjarres profil fotoğrafı
Pablo Manjarres9 gün önce

finally, move nodes without killing playback

Benzer Videolar