Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Interactive Web Pages with JavaScript Traversing and Manipulating the DOM with JavaScript Perform: Modifying Elements

Uncaught NoModificationAllowedError [...] The 'input' element does not support text insertion.

I'm getting this error message logged to the console.

"Uncaught NoModificationAllowedError: Failed to set the 'innerText' property on 'HTMLElement': The 'input' element does not support text insertion."

It says the problem is on line 38 of my .js file. That is 'label.innerText = taskString'. Up to this point the console has told me where the problem has been and I've fixed it. But I can't see what's different about my code and Chalkley's D:

Is there anything wrong here? Lines 30-38 of my .js file.

Or, is there anything specific, given my error message, that I should be looking for elsewhere in my .js file?

  checkBox.type = "checkbox";
  editInput.type = "text";

  editButton.innerText = "Edit";
  editButton.className = "edit";
  deleteButton.innerText = "Delete";
  deleteButton.className = "delete";

  label.innerText = taskString;
}

Thx ~Jay

1 Answer

Kieran Gibbons
Kieran Gibbons
17,434 Points

i was having the same isssue just now. Try checking this bit:- //input (checkbox) var checkBox = document.createElement("input"); // checkbox //label var label = document.createElement("label"); //input (text) var editInput = document.createElement("input"); // text //button.edit var editButton = document.createElement("button"); ////////I had this set as "input" originally///////////// //button.delete var deleteButton = document.createElement("button");