Skip to content

Instantly share code, notes, and snippets.

@marksherman
Created June 16, 2015 16:12

Revisions

  1. marksherman created this gist Jun 16, 2015.
    24 changes: 24 additions & 0 deletions replmgr.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    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);
    }
    };