navigation.addEventListener("navigatesuccess", (event) => {
loadingIndicator.hidden = true;
});Navigation: navigatesuccess event / notebook
Navigation: navigatesuccess event
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
navigation.addEventListener("navigateerror", (event) => {
loadingIndicator.hidden = true; // also hide indicator
showMessage(`Failed to load page: ${event.message}`);
});