Skip to content
Dethe Elza edited this page Jan 16, 2015 · 7 revisions

OUTDATED: This page needs to be updated and does not reflect the current state of Waterbear.


WikiAPI ReferenceWorkspace

This is where the IDE is defined and implemented, built around the framework provided by HTML in the [language].html file. Event handlers, load and save, switching views, downloading code, etc. are handled here.


# wb.clearScripts(event, force)

Clears the scripts workspace.

  • event: The event that triggered this function.
  • force: true for clearing the script without prompt; false otherwise.

===

# wb.createWorkspace(name)

Creates a new empty workspace.

  • name: Name of the workspace.

===

# wb.historySwitchState(state, clearFiles)

Stores the current state and switches to the new state.

  • state: The new state to switch to.
  • clearFiles: A boolean value for clearing the existing Gist and example.

===

# wb.wireUpWorkspace(workspace)

Sets the workspace to a specific value.

  • workspace: The new workspace object.

===