Created
September 26, 2013 19:38
-
-
Save robdodson/6719435 to your computer and use it in GitHub Desktop.
disable imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2013 The Polymer Authors. All rights reserved. | |
* Use of this source code is governed by a BSD-style | |
* license that can be found in the LICENSE file. | |
*/ | |
(function(){ | |
// bootstrap | |
// IE shim for CustomEvent | |
if (typeof window.CustomEvent !== 'function') { | |
window.CustomEvent = function(inType) { | |
var e = document.createEvent('HTMLEvents'); | |
e.initEvent(inType, true, true); | |
return e; | |
}; | |
} | |
function bootstrap() { | |
// preload document resource trees | |
// HTMLImports.importer.load(document, function() { | |
// HTMLImports.parser.parse(document); | |
// HTMLImports.readyTime = new Date().getTime(); | |
// send HTMLImportsLoaded when finished | |
document.dispatchEvent( | |
new CustomEvent('HTMLImportsLoaded', {bubbles: true}) | |
); | |
// }); | |
}; | |
if (document.readyState === 'complete') { | |
bootstrap(); | |
} else { | |
window.addEventListener('DOMContentLoaded', bootstrap); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment