Skip to content

Should <template patchfor> work with innerHTML? #31

@foolip

Description

@foolip

https://chromium-review.googlesource.com/c/chromium/src/+/6769684 makes it work in the Chromium prototype with an added test, but I'm not sure it's sensible.

In particular, consider the situation where element.innerHTML = '...<template patchfor=target>stuff</template>' if elements with id "target" appear both before the <template patchfor> inside the HTML being parsed, and after element. Now reverse the before/after in this situation.

I think that no matter how it's defined, there will be a surprising situation where the element patched isn't the one that's first in tree order after the parsing is done.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions