Post

Replies

Boosts

Views

Activity

Is it legit to inject javascript into WKWebview ?
Hi, Declaration : Apologies if this question is already answered somewhere else but I wam askng here so I can use it as proof. Few context I am working in an App which is fall under social media application/ In app there is a module which we use to load HTML urls (call ie in-app browser) We want to monitor error occurred during user browsing HTML pages in in-app browser including JAVA-SCRIPT errors. For above reason I am planning to inject below javascript in every HTML pages window.addEventListener('error', (error) => {    const message = { message: error.message, } window.webkit.messageHandlers.jserror.postMessage(message); Questions Are Is it legit to inject above javascript into WKWebView where App fall under social media app ? Is there any security risk involve ?
6
0
1.5k
Oct ’22