I call following script with ClearScript V8.
===================================================================
document.addEventListener('DOMContentLoaded', function () {
const images = document.getElementsByTagName('img');
if (images.length === 0) {
return;
}
for (let i = 0; i < images.length; i++) {
const img = images[i];
console.log(`Img ${i + 1}: ${src}`);
}
});
====================================================================
When it loaded, function object type is not ScriptObject. It is Microsoft.ClearScript.V8.SplitProxy.V8ObjectImpl.
So, I can not call function of DOMContentLoaded, because it is not ScriptObject.
It seems a proxy issue.
Is there any work around?
I call following script with ClearScript V8.
===================================================================
====================================================================
When it loaded, function object type is not ScriptObject. It is Microsoft.ClearScript.V8.SplitProxy.V8ObjectImpl.
So, I can not call function of DOMContentLoaded, because it is not ScriptObject.
It seems a proxy issue.
Is there any work around?