Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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");