Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

insertBefore may fail using the AngularWay #91

@nicoabie

Description

@nicoabie

It seems that sometimes its second param (settings.nTableReinsertBefore the datatables loading message) is not yet inserted in the DOM
Throwing "Error: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node."

I couldn't found the cause of it to happen, but a "fix" I've found was

try {
    orig.insertBefore(table, settings.nTableReinsertBefore);    
}catch(ex){
    console.log(ex);
    orig.appendChild(table);
}

To force its replication, render a table using the angularway, remove from dom the loading message and render it again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions