Right now when you set the id property, as opposed to setAttribute('id'), and then see the output of innerHTML, it doesn't reflect the updated id value.
The property id is populated correctly from the attribute id during the constructor, but subsequent changes to id don't change the innerHTML. It is good that the attribute isn't affected, as it only reflects the initial value, but innerHTML and similar members should reflect the "live" value, which includes the property.
Right now when you set the
idproperty, as opposed tosetAttribute('id'), and then see the output ofinnerHTML, it doesn't reflect the updated id value.The property
idis populated correctly from the attributeidduring the constructor, but subsequent changes toiddon't change theinnerHTML. It is good that the attribute isn't affected, as it only reflects the initial value, but innerHTML and similar members should reflect the "live" value, which includes the property.