-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add method to enable/disable a worker for the current session.
- Loading branch information
Showing
1 changed file
with
10 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,6 +164,16 @@ public native void setModeByName(String shortModeName) /*-{ | |
editor.getSession().setMode(new TheMode()); | ||
}-*/; | ||
|
||
/** | ||
* Enable a worker for the current session. | ||
* | ||
* @param userWorker true to enable a worker otherwise false | ||
*/ | ||
public native void setUseWorker(boolean useWorker) /*-{ | ||
var editor = [email protected]::editor; | ||
editor.getSession().setUseWorker(useWorker); | ||
}-*/; | ||
|
||
/** | ||
* Register a handler for change events generated by the editor. | ||
* | ||
|