Last active
February 17, 2016 03:50
-
-
Save PyroAVR/94c950ff62ec4ace1905 to your computer and use it in GitHub Desktop.
Chilipeppr loading problems when using Github
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
// This code should be pasted into the ChiliPeppr Edit Boot Javascript dialog box | |
// located in the upper right corner of any chilipeppr.com page. | |
// The ChiliPeppr environment has a standard div called #pnlWorkspace that | |
// this workspace should be loaded into. | |
chilipeppr.load( | |
"#pnlWorkspace", | |
"http://raw.githubusercontent.com/PyroAVR/pyroavr-tinyg/master/auto-generated-workspace.html", | |
function() { | |
// Callback after workspace loaded into #pnlWorkspace | |
// Now use require.js to get reference to instantiated workspace | |
cprequire( | |
["inline:com-chilipeppr-workspace-pyroavr-tinyg"], // the id you gave your workspace | |
function(myWorkspacePyroavrTinyg) { | |
// Callback that is passed reference to the newly loaded workspace | |
console.log("Workspace / TinyG just got loaded.", myWorkspacePyroavrTinyg); | |
myWorkspacePyroavrTinyg.init(); | |
} | |
); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment