Skip to content

Instantly share code, notes, and snippets.

@Comandeer
Created July 7, 2018 20:45
Embed
What would you like to do?
registerComponent boilerplate
window.loadComponent = ( function() {
function fetchAndParse( URL ) {
[…]
}
function registerComponent() {
}
function loadComponent( URL ) {
return fetchAndParse( URL ).then( registerComponent );
}
return loadComponent;
}() );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment