Skip to content

Instantly share code, notes, and snippets.

@marksherman
Created June 16, 2015 16:12
Show Gist options
  • Save marksherman/5a732e9862a040e58c4d to your computer and use it in GitHub Desktop.
Save marksherman/5a732e9862a040e58c4d to your computer and use it in GitHub Desktop.
Test block data polling on change
Blockly.ReplMgr.pollYail = function() {
console.log("Mark! pollYail ran\n");
console.log(Blockly.mainWorkspace.getTopBlocks(false));
try {
if (window === undefined) // If window is gone, then we are a zombie timer firing
return; // in a destroyed frame.
} catch (err) { // We get an error on FireFox when window is gone.
return;
}
if (window.parent.ReplState.state == this.rsState.CONNECTED) {
this.buildYail();
}
if (this.RefreshAssets === null) {
try {
this.RefreshAssets = window.parent.AssetManager_refreshAssets;
} catch (err) {
}
}
if (window.parent.ReplState.state == this.rsState.CONNECTED) {
this.RefreshAssets(this.formName);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment