I am writing an application for android, it has its own local browser, it comes to the page, and id header should be removed from this page.
Line
view.loadUrl("javascript:document.getElementsById('header').style.display = 'none'; "); for some reason does not work, but if you do so
mWebView.loadUrl("javascript:var x = document.getElementsByClassName('header'); document.write(x); "); then it will output [objectHTMLCollection ].
Moreover, if you do this
"javascript:var x = document.getElementsByClassName('header'); x.style.display = 'none';" then nothing happens either.
Question: how can I still hide this element?