Skip to content

Instantly share code, notes, and snippets.

@Comandeer
Created July 7, 2018 20:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Comandeer/cbf56e87fb018bb8a04adc2c077e060c to your computer and use it in GitHub Desktop.
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