Files
hyperframes/packages
Vance Ingalls 5a48321726 fix(core): applyPositionEdits fails silently across iframe realms
applyPositionEdits(doc) guarded each element with `instanceof HTMLElement` —
but `doc` is frequently an iframe's document (the SDK's edit preview, any host
embedding a composition), whose elements are HTMLElement instances of THAT
frame's realm, never this module's. The check silently no-ops on every single
element cross-realm, so bulk position edits never apply inside an iframe.

Use the document's own realm's HTMLElement constructor (doc.defaultView);
duck-type on `.style` when defaultView is unavailable (a detached/synthetic
document). The single-element applyPositionEditToElement was already
realm-safe — only the bulk wrapper had the bug.

Added a regression test using a real jsdom iframe, confirmed it fails on the
old `instanceof HTMLElement` check and passes with the fix.
2026-07-08 23:56:20 -07:00
..
2026-07-08 22:15:49 -07:00
2026-07-08 22:15:49 -07:00
2026-07-08 22:15:49 -07:00
2026-07-08 22:15:49 -07:00
2026-07-08 22:15:49 -07:00
2026-07-08 22:15:49 -07:00
2026-07-08 22:15:49 -07:00
2026-07-08 22:15:49 -07:00
2026-07-08 22:15:49 -07:00
2026-06-16 13:16:09 -04:00
2026-07-08 22:15:49 -07:00
2026-07-08 22:15:49 -07:00
2026-07-08 22:15:49 -07:00