domready
domready copied to clipboard
Error on android Webview
DomReady
worked before the webview on Android 4.4 ,But not work for Android 5+
what is the error you get?
I guess
if (typeof module != 'undefined') module.exports = definition() else if (typeof define == 'function' && typeof define.amd == 'object') define(definition) else this[name] = definition()
may make the problem , I can not get error detail and when I replace domready with a sample code bellow
function domready(fn) {
var readyState = document.readyState;
if (readyState === 'interactive' || readyState === 'complete') {
fn();
} else {
window.addEventListener('DOMContentLoaded', fn);
}
};
It will work! Android Webview after 4.4 is based on chromium , I searched for more infos but there is not related message