From 07bdf28d7f3224c8c3094ccfc65f2a6a3bec62d4 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 8 Oct 2026 13:46:53 +0000 Subject: [PATCH 1/4] Update links, images and iframes in place when href or src changes An href or src still pairs elements sharing it first, but no longer stops an element matching by its tag, so a focused link keeps focus and an iframe or image is updated rather than replaced. A name, an id and form controls keep their rules. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01LSdDY3ErxNaeULsmoUQS4q --- README.md | 2 +- src/morphlex.ts | 6 +- test/new/href-src-in-place.browser.test.ts | 78 +++++++++++++++++++++ test/new/sibling-matching.browser.test.ts | 4 -- test/new/tagname-exclusions.browser.test.ts | 24 ------- 5 files changed, 83 insertions(+), 31 deletions(-) create mode 100644 test/new/href-src-in-place.browser.test.ts diff --git a/README.md b/README.md index 96eb719..9fe8f2f 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ When morphing the children of an element, Morphlex pairs each new child with an 4. An element that contains one of the same `id`s somewhere inside it. 5. With `preserveChanges`, a checkbox, radio or option the user changed is paired with one making the same choice, such as the same name and value in the same form, and an element such as a `