Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
patrickmaciel opened this issue Aug 2, 2015 · 2 comments

Comments

@patrickmaciel
Copy link

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.

@nbubna
Copy link
Member

nbubna commented Aug 3, 2015

A runnable example is always the most helpful. Do you know how to use https://jsfiddle.net/ ?

@patrickmaciel
Copy link
Author

I will write an example tonight.

Thanks anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants