I’m unable to remove an element dynamically from a web page. After running the code, the element still shows up on screen and is only removed when clicked.
onPageFinished: (url){
removeAds(url);
},
void removeAds(String url){
print("asdjkhjahsdk");
_controller.evaluateJavascript('var ad= document.getElementById("_b04pct_2709847"); ad.parentNode.removeChild(ad);');
}