I tried removing the custom handlers and attempted this:
(function() {
addEventListener('mousedown', function() {
window.webkit.messageHandlers.postMessage('WKUserScriptMouseDown');
}, true);
})();
I would think this broadcast the message to all the handlers?? However now I get the error message:
TypeError: undefined is not an object (evaluating 'window.webkit.messageHandlers.postMessage')
My next attempt is to wrap this line into a (function() {})(); but if someone else has an idea or is facing similar issues with iOS beta 17.2 only it would be great to hear ideas
Topic:
App & System Services
SubTopic:
Core OS
Tags: