nzakas / understandinges6

Content for the ebook "Understanding ECMAScript 6"
5.45k stars 796 forks source link

Potential typo in 09 - Classes - innerHTML method #451

Closed ronen-e closed 3 years ago

ronen-e commented 4 years ago

In Chapter 9 - Classes, line 308, under the section "Accessor Properties" there is a potential typo

It has both a getter and setter for html that delegates to the innerHTML method on the element itself.

Reason: Element.innerHTML is not a function/method. It is considered a string valued property.

Solution:

It has both a getter and setter for html that delegates to the innerHTML property on the element itself.

nzakas commented 3 years ago

Thanks!