ace: Delete dead code
parent
5283bfc14a
commit
cc688f7367
|
@ -29,9 +29,6 @@ Returns the `rep` object.
|
|||
## editorInfo.ace_applyPreparedChangesetToBase()
|
||||
## editorInfo.ace_setUserChangeNotificationCallback(f)
|
||||
## editorInfo.ace_setAuthorInfo(author, info)
|
||||
## editorInfo.ace_setAuthorSelectionRange(author, start, end)
|
||||
## editorInfo.ace_getUnhandledErrors()
|
||||
## editorInfo.ace_getDebugProperty(prop)
|
||||
## editorInfo.ace_fastIncorp(?)
|
||||
## editorInfo.ace_isCaret(?)
|
||||
## editorInfo.ace_getLineAndCharForPoint(?)
|
||||
|
|
|
@ -120,7 +120,6 @@ const Ace2Editor = function () {
|
|||
'applyPreparedChangesetToBase',
|
||||
'setUserChangeNotificationCallback',
|
||||
'setAuthorInfo',
|
||||
'setAuthorSelectionRange',
|
||||
'callWithAce',
|
||||
'execCommand',
|
||||
'replaceRange',
|
||||
|
@ -137,8 +136,6 @@ const Ace2Editor = function () {
|
|||
|
||||
this.exportText = () => loaded ? info.ace_exportText() : '(awaiting init)\n';
|
||||
|
||||
this.getDebugProperty = (prop) => info.ace_getDebugProperty(prop);
|
||||
|
||||
this.getInInternationalComposition =
|
||||
() => loaded ? info.ace_getInInternationalComposition() : null;
|
||||
|
||||
|
@ -152,9 +149,6 @@ const Ace2Editor = function () {
|
|||
// changes, and modify the changeset to be applied by applyPreparedChangesetToBase accordingly.
|
||||
this.prepareUserChangeset = () => loaded ? info.ace_prepareUserChangeset() : null;
|
||||
|
||||
// returns array of {error: <browser Error object>, time: +new Date()}
|
||||
this.getUnhandledErrors = () => loaded ? info.ace_getUnhandledErrors() : [];
|
||||
|
||||
const addStyleTagsFor = (doc, files) => {
|
||||
for (const file of files) {
|
||||
const link = doc.createElement('link');
|
||||
|
|
|
@ -50,8 +50,6 @@ function Ace2Inner(editorInfo, cssManagers) {
|
|||
const FORMATTING_STYLES = ['bold', 'italic', 'underline', 'strikethrough'];
|
||||
const SELECT_BUTTON_CLASS = 'selected';
|
||||
|
||||
const caughtErrors = [];
|
||||
|
||||
let thisAuthor = '';
|
||||
|
||||
let disposed = false;
|
||||
|
@ -375,13 +373,6 @@ function Ace2Inner(editorInfo, cssManagers) {
|
|||
});
|
||||
|
||||
cleanExit = true;
|
||||
} catch (e) {
|
||||
caughtErrors.push(
|
||||
{
|
||||
error: e,
|
||||
time: +new Date(),
|
||||
});
|
||||
throw e;
|
||||
} finally {
|
||||
const cs = currentCallStack;
|
||||
if (cleanExit) {
|
||||
|
@ -695,28 +686,9 @@ function Ace2Inner(editorInfo, cssManagers) {
|
|||
editorInfo.ace_setAuthorInfo = (author, info) => {
|
||||
setAuthorInfo(author, info);
|
||||
};
|
||||
editorInfo.ace_setAuthorSelectionRange = (author, start, end) => {
|
||||
changesetTracker.setAuthorSelectionRange(author, start, end);
|
||||
};
|
||||
|
||||
editorInfo.ace_getUnhandledErrors = () => caughtErrors.slice();
|
||||
|
||||
editorInfo.ace_getDocument = () => document;
|
||||
|
||||
editorInfo.ace_getDebugProperty = (prop) => {
|
||||
if (prop === 'debugger') {
|
||||
// obfuscate "eval" so as not to scare yuicompressor
|
||||
window['ev' + 'al']('debugger');
|
||||
} else if (prop === 'rep') {
|
||||
return rep;
|
||||
} else if (prop === 'window') {
|
||||
return window;
|
||||
} else if (prop === 'document') {
|
||||
return document;
|
||||
}
|
||||
return undefined;
|
||||
};
|
||||
|
||||
const now = () => Date.now();
|
||||
|
||||
const newTimeLimit = (ms) => {
|
||||
|
|
Loading…
Reference in New Issue