this js code is used by an ios app called Shortcuts it allow users to run javaScript on Safari browser. I want to use this js code to run on kodular webview. I tried it but failed , any idea friends?
JS code
var result = [ ];
var elements = document.querySelectorAll(“a”);
for ( let element of elements ) {
result.push({
“url”: element.href,
“text”: element.innerText
});
}
completion(result);