Skip to content

Uncaught HierarchyRequestError: Failed to execute 'appendChild' on 'Node': Only one element on document allowed. #2

@patrickmaciel

Description

@patrickmaciel

I convert my code from HTML.js to DOMx but get the following error.

Uncaught HierarchyRequestError: Failed to execute 'appendChild'
 on 'Node': Only one element on document allowed.

I get this error when I try to do that:

      var tr = table.query('tbody').append('tr');
      tr.append('td').textContent = '-';

      fields.each(function(field) {
        var td = tr.append('td');             // HERE I GET THE ERROR
      });

What I'm trying to do in this code is:

  • Insert a new line in a table
  • Fill the first td with a -
  • Fill the next td with values from a form
  • The last td I put a link

If you need a complete code, tell me.

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