Skip to content

Uncaught HierarchyRequestError: Failed to execute 'appendChild' on 'Node': This node type does not support this method. ({hydration: true}) #89

@dominikkrulak

Description

@dominikkrulak

index.html

<div id="hydrate">
        <!--Template start-->
	<div>Text node<div>Custom label</div></div>
</div>

test.html

<div id="{{ data.id }}"><div>{{ data.label }}</div></div>

test.js

const data = {id: 'x', label: 'new Label'};
const root = document.getElementById("hydrate");
const view = new Mikado(testTemplate, { root: root, hydrate: true });
view.render(data);

The title of this issue speaks for itself.
With the hydration on, I get this error logged in my console. Looks like hydration matched the structure, but failed to append Node to the textNode. If the Node is type of textNode the appendChild method fails.

Hm, I should fork this repository to see what's going on...

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