Thanks to visit codestin.com
Credit goes to github.com

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: github/template-parts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 38c304a
Choose a base ref
...
head repository: github/template-parts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0678eb7
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Dec 9, 2024

  1. Accept Node values as Template Parts

    Related to [#62][] (see [3.2. Template Parts and Custom Template Process Callback][])
    Follow-up to [#65][]
    
    While the changes made in [#65][] improved support for `Element` parts,
    the expansion from `string` to `Element | string` was not broadened
    enough. While all `Element` instances are DOM Nodes, not all DOM Nodes
    are `Element` instances.
    
    For example, this change enables support for [DocumentFragment][]
    instances (generated from classes like [Range][] or properties like
    [HTMLTemplateElement.content][]), where prior support resulted in
    templating the `[object DocumentFragment]` text string instead of the
    fragment's `Node` instances.
    
    [#62]: #62
    [3.2. Template Parts and Custom Template Process Callback]: https://github.com/WICG/webcomponents/blob/159b1600bab02fe9cd794825440a98537d53b389/proposals/Template-Instantiation.md#32-template-parts-and-custom-template-process-callback
    [#65]: #65
    [DocumentFragment]: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment
    [HTMLTemplateElement.content]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLTemplateElement/content
    seanpdoyle committed Dec 9, 2024
    Configuration menu
    Copy the full SHA
    28f61c6 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #73 from seanpdoyle/accept-node-template-parts

    Accept `Node` values as Template Parts
    keithamus authored Dec 9, 2024
    Configuration menu
    Copy the full SHA
    0678eb7 View commit details
    Browse the repository at this point in the history
Loading