I am currently dealing with a situation where I need to extract a specific URL string that is being displayed in a WKWebview. This URL string appears in a new window within the Webview when a button is clicked, using the window.open
function. Here is the code snippet responsible for opening the new window with the URL:
var data = cmp_pv.consentString.getConsentString();
console.log("Consent writeCookie -----> " + data);
var fnct = (cmp_pv.conf.hasGlobalScope) ? '_writeGlobalCookie' : '_writeCookie';
this[fnct](this.vendorCookieName, data, 33696000, '/', cmp_pv.conf.cookieDomain);
window.open('consent://' + data);
My goal is to retrieve the exact string that appears at the end of the URL after clicking the button in the WKWebview.