I am developing a customized gecko powered android browser. I want to print the source code in console.
When I try to print it shows [object HTMLDocument]
.
The code is given below :
function onPageLoad(event) {
// the target is an HTMLDocument
let contentDocument = event.target;
let browser = BrowserApp.getBrowserForDocument(contentDocument);
console.log("Page loaded: " + browser.contentTitle);
console.log("Page loaded content: " + browser.contentDocument);
}
The output is Page loaded content: [object HTMLDocument]
I want to print the source code in [object HTMLDocument]
.