-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to Switch Away from Using
innerHTML
It's bad practice to set `innerHTML` as this has a high performance cost. Instead of using `innerHTML` we switch to use `textContent` when the only thing being replaced is the text. When we insert multiple children nodes to the element (button), we now use the helper functions `getIndicatorHolder` and `getTextSpan` to separately generate the HTML Elements needed to insert as a child element to the button by using `insertAdjacentElement`.
- Loading branch information
Showing
1 changed file
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters