When a Javascript posts a message to Native Code using
window.webkit.messageHandlers.<messageHandlerName>.postMessage(<messageBody>)
If I have a JS calling the Native code like this.
window.webkit.messageHandlers.countryListHandler.postMessage("<country List payload>")
How can this invocation be limited to a specific script ? Can WKContentWorld
help here ? if yes then how?
Can creating a custom world name help?