I've seen that SafariBeforeSearchEvent
event fires before the Smart Search Field performs a search. So I've started to try it out, but it isn't works or my code is wrong. Here's my code:
safari.application.addEventListener("SafariBeforeSearchEvent", handleBeforeSearch, false);
function handleBeforeSearch(event) {
alert("Test");
}
And when I search something using the smart search field, no alert appears. Why is that?