Store.removeBook(e.target.parentElement.previousSibling.textContent);
, но пишет что Cannot read property 'textContent' of null
. var el = e.target.parentElement.previousSibling;
if(el) Store.removeBook(el.textContent);
else ...
Store.removeBook(e.target.parentElement.previousSibling.previousSibling.textContent);
Store.removeBook(e.target.parentElement.previousElementSibling.textContent);
Store.removeBook(e.target.parentElement.previousElementSibling.innerHTML);
Store.removeBook(e.target.parentElement.previousSibling.data);