I’m a beginner in building codes, and I’m building a chrome extension. I have done all the things the book told me, but it doesn’t work. This is part of my HTML and Js code. If I check the “clear-history-checkbox”check box, I want the JS to delete all the history.
로그삭제 <input type="checkbox" id="clear-history-checkbox" onclick="clearHistory()">
JS: function clearHistory() {
chrome.history.deleteAll(function() {
alert("History cleared!");
});
}
I’ve placed in body and head, but it didn’t work.