Spy On DOM Methods And Properties

· Gleb Bahmutov · Nov. 23, 2021, 3:08 a.m.
Summary
In the bahmutov/sorted-table-example example, the application sets and removes DOM element attributes:app.js1234function enableButtons() { document.getElementById('sort-by-date').removeAttribute('disabled') document.getElementById('sort-reverse').removeAttribute('disabled')}The application updates the table body by assigning the .innerHTML property1234function sortTable() { document.getElementById('people-data').innerHTML = listToHtml(sorted) enableButtons()}Can we a) detect when the applica...
AUTHOR