Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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 Aufrufe • vor 1 Monat •via X (Twitter)

7 Kommentare

Profilbild von Todels ☁
Todels ☁vor 1 Monat

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

Profilbild von Zafar
Zafarvor 1 Monat

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

Profilbild von Griz
Grizvor 1 Monat

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

Profilbild von Code Hz
Code Hzvor 1 Monat

or you can use view-transition

Profilbild von Sam
Samvor 1 Monat

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

Profilbild von יוסי
יוסיvor 1 Monat

Claude knowns it already haha

Profilbild von Pablo Manjarres
Pablo Manjarresvor 1 Monat

finally, move nodes without killing playback

Ähnliche Videos