for (let i=0;i<10;iPP){
const html = `<webview src="http://www.github.com">i</webview>`;
$(".container").append(html)
}
const webview = document.querySelectorAll("webview")
webview[0].addEventListener("console-message", e => {
console.log(e.message);
if(e.message.indexOf("")!==-1){
alert("")
}
});
you need to traverse one or more webview tags on a page. There is an event called console-message, that returns some strings from time to time, so I want to monitor this event in real time. If I know the number of webview tags in advance, this is not a problem, but this tag may be N, then I have to create N addEventListener monitoring events. There is no train of thought at all. Thank you
.