Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: capricorn86/happy-dom
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v13.7.1
Choose a base ref
...
head repository: capricorn86/happy-dom
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3b4339d709bb9b097a8302996dc4af356f496e1a
Choose a head ref
  • 5 commits
  • 2 files changed
  • 2 contributors

Commits on Mar 1, 2024

  1. fix(cloneNode): Cloned node attributeChanged callbacks no longer run …

    …on uninitialized element.
    itutto committed Mar 1, 2024
    Copy the full SHA
    915222f View commit details

Commits on Mar 10, 2024

  1. Merge branch 'master' into master

    capricorn86 authored Mar 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ee1c28a View commit details
  2. Merge pull request #1284 from itutto/master

    Fix: Fragile cloneNode implementation
    capricorn86 authored Mar 10, 2024
    Copy the full SHA
    1eaa5f5 View commit details
  3. chore: [#1272] Fixes problem with the release

    capricorn86 committed Mar 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ddb572b View commit details
  4. Merge pull request #1291 from capricorn86/fix-release

    chore: [#1272] Fixes problem with the release
    capricorn86 authored Mar 10, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    3b4339d View commit details
Showing with 6 additions and 5 deletions.
  1. +2 −1 .github/workflows/release.yml
  2. +4 −4 packages/happy-dom/src/nodes/element/Element.ts
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -6,7 +6,8 @@ on:

permissions:
contents: write
pull-requests: read
actions: read
pull-requests: write

jobs:
check-next-version:
8 changes: 4 additions & 4 deletions packages/happy-dom/src/nodes/element/Element.ts
Original file line number Diff line number Diff line change
@@ -467,6 +467,10 @@ export default class Element extends Node implements IElement {
public cloneNode(deep = false): IElement {
const clone = <Element>super.cloneNode(deep);

clone[PropertySymbol.tagName] = this[PropertySymbol.tagName];
clone[PropertySymbol.localName] = this[PropertySymbol.localName];
clone[PropertySymbol.namespaceURI] = this[PropertySymbol.namespaceURI];

for (let i = 0, max = this[PropertySymbol.attributes].length; i < max; i++) {
const attribute = this[PropertySymbol.attributes][i];
clone[PropertySymbol.attributes].setNamedItem(
@@ -488,10 +492,6 @@ export default class Element extends Node implements IElement {
}
}

clone[PropertySymbol.tagName] = this[PropertySymbol.tagName];
clone[PropertySymbol.localName] = this[PropertySymbol.localName];
clone[PropertySymbol.namespaceURI] = this[PropertySymbol.namespaceURI];

return <IElement>clone;
}