javascript - Best DOMContentLoaded fallback -
what best way fallback of domcontentloaded not supported < ie9?
document.addeventlistener('domcontentloaded',function(){/*code here*/})
from mdn:
internet explorer 8 supports
readystatechange
event, can used detect dom ready. in earlier version of internet explorer, state can detected regularily trying executedocument.documentelement.doscroll("left")
, snippet throw error until dom ready.
Comments
Post a Comment