Skip to content

Commit

Permalink
Merge pull request #37 from noahbuscher/master
Browse files Browse the repository at this point in the history
Expose initApplication() to window
  • Loading branch information
michael-iglesias authored Dec 14, 2018
2 parents 4613b50 + 3a882f5 commit e8d8a45
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/react/common/Input.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/react/common/Textarea.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,10 @@ const initApplication = () => {
startApplication(root, attrs)
}

window.$ChainpointClient = {
init: function() {
initApplication();
}
};

document.addEventListener('DOMContentLoaded', initApplication)
9 changes: 9 additions & 0 deletions src/standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,13 @@ const initApplication = () => {
startApplication(root, attrs);
};

/**
* Expose init method to window; used if render needs to occur after DOM load
*/
window.$ChainpointClient = {
init: function() {
initApplication();
}
};

document.addEventListener('DOMContentLoaded', initApplication);

0 comments on commit e8d8a45

Please sign in to comment.