@@ -9,16 +9,16 @@ export type ListItem = {
99 link : string
1010}
1111
12- // Two functions that need to be implemented to use the modal
13- // When the user clicks the button, open the modal
12+ // Two functions that need to be implemented to use the modal.
13+ // When the user clicks the button, open the modal.
1414/* Click handler on the button to display it.
1515btn.onclick = function() {
1616 modal.style.display = "block";
1717}
1818
19- // When the user clicks anywhere outside of the modal, close it
20- Window click handler so that the modal will close
21- even if the user doesn't click close
19+ // When the user clicks anywhere outside of the modal, close it.
20+ // Window click handler so that the modal will close
21+ // even if the user doesn't click close.
2222window.onclick = function(event) {
2323 if (event.target == modal) {
2424 modal.style.display = "none";
@@ -68,7 +68,7 @@ const createListItems = (dom: HTMLDocument, list: ListItem) => {
6868 const link : HTMLAnchorElement = dom . createElement ( 'a' )
6969 link . setAttribute ( 'style' , style . modalAnchorStyle )
7070 link . href = list . link
71- link . innerHTML = list . label
71+ link . textContent = list . label
7272 li . appendChild ( link )
7373 return li
7474}
0 commit comments