MCPcopy Index your code
hub / github.com/textAngular/textAngular / testAndSet

Function testAndSet

src/main.js:435–440  ·  view source on GitHub ↗
(choice, beforeState)

Source from the content-addressed store, hash-verified

433 scope.displayElements.html.addClass("ta-html ta-editor " + scope.classes.htmlEditor);
434
435 var testAndSet = function(choice, beforeState) {
436 /* istanbul ignore next: this is only here because of a bug in rangy where rangy.saveSelection() has cleared the state */
437 if (beforeState !== $document[0].queryCommandState(choice)) {
438 $document[0].execCommand(choice, false, null);
439 }
440 };
441 // used in the toolbar actions
442 scope._actionRunning = false;
443 var _savedSelection = false;

Callers 1

main.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected