polyfills for domcontentloaded and customevent