Use console.warn for deprecated methods
console.warn makes better sense than console.log and matches similar warnings in ace (see gutter.js for example).
This commit is contained in:
parent
026af74016
commit
810e196cc6
3 changed files with 7 additions and 7 deletions
|
|
@ -288,23 +288,23 @@ var Document = function(textOrLines) {
|
|||
|
||||
// Deprecated methods retained for backwards compatibility.
|
||||
this.insert = function(position, text){
|
||||
console.log('Warning: document.insert is deprecated. Use the insertText method instead.');
|
||||
console.warn('Use of document.insert is deprecated. Use the insertText method instead.');
|
||||
return this.insertText(position, text);
|
||||
}
|
||||
this.insertLines = function(row, lines) {
|
||||
console.log('Warning: document.insertLines is deprecated. Use the insertFullLines method instead.');
|
||||
console.warn('Use of document.insertLines is deprecated. Use the insertFullLines method instead.');
|
||||
return this.insertFullLines(row, lines);
|
||||
}
|
||||
this.removeLines = function(firstRow, lastRow) {
|
||||
console.log('Warning: document.removeLines is deprecated. Use the removeFullLines method instead.');
|
||||
console.warn('Use of document.removeLines is deprecated. Use the removeFullLines method instead.');
|
||||
return this.removeFullLines(firstRow, lastRow);
|
||||
}
|
||||
this.insertNewLine = function(position) {
|
||||
console.log('Warning: document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead.');
|
||||
console.warn('Use of document.insertNewLine is deprecated. Use insertMergedLines(position, [\'\', \'\']) instead.');
|
||||
return this.insertMergedLines(position, ['', '']);
|
||||
}
|
||||
this.insertInLine = function(position, text) {
|
||||
console.log('Warning: document.insertInLine is deprecated. Use insertText instead.');
|
||||
console.warn('Use of document.insertInLine is deprecated. Use insertText instead.');
|
||||
return this.insertText(position, text);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1130,7 +1130,7 @@ var EditSession = function(text, mode) {
|
|||
|
||||
// Deprecated method retained for backwards compatibility.
|
||||
this.insert = function(position, text){
|
||||
console.log('Warning: editsession.insert is deprecated. Use the insertText method instead.');
|
||||
console.warn('Use of editsession.insert is deprecated. Use the insertText method instead.');
|
||||
return this.insertText(position, text)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -832,7 +832,7 @@ var Editor = function(renderer, session) {
|
|||
|
||||
// Deprecated method retained for backwards compatibility.
|
||||
this.insert = function(text){
|
||||
console.log('Warning: editor.insert is deprecated. Use the insertText method instead.');
|
||||
console.warn('Use of editor.insert is deprecated. Use the insertText method instead.');
|
||||
return this.insertText(text)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue