Remove three functions deprecated in 2015

We’ve had four years of console warnings, and this next release is known to be breaking.  Each is trivial to fix in code.
This commit is contained in:
Neil Fraser
2019-09-12 18:04:45 -07:00
parent 23caa12571
commit e43e19d19a
3 changed files with 0 additions and 40 deletions

View File

@@ -207,20 +207,6 @@ Blockly.Block = function(workspace, prototypeName, opt_id) {
}
};
/**
* Obtain a newly created block.
* @param {!Blockly.Workspace} workspace The block's workspace.
* @param {?string} prototypeName Name of the language object containing
* type-specific functions for this block.
* @return {!Blockly.Block} The created block.
* @deprecated December 2015
*/
Blockly.Block.obtain = function(workspace, prototypeName) {
console.warn('Deprecated call to Blockly.Block.obtain, ' +
'use workspace.newBlock instead.');
return workspace.newBlock(prototypeName);
};
/**
* Optional text data that round-trips beween blocks and XML.
* Has no effect. May be used by 3rd parties for meta information.

View File

@@ -377,21 +377,6 @@ Blockly.hideChaff = function(opt_allowToolbox) {
}
};
/**
* When something in Blockly's workspace changes, call a function.
* @param {!Function} func Function to call.
* @return {!Array.<!Array>} Opaque data that can be passed to
* removeChangeListener.
* @deprecated April 2015
*/
Blockly.addChangeListener = function(func) {
// Backwards compatibility from before there could be multiple workspaces.
console.warn(
'Deprecated call to Blockly.addChangeListener, ' +
'use workspace.addChangeListener instead.');
return Blockly.getMainWorkspace().addChangeListener(func);
};
/**
* Returns the main workspace. Returns the last used main workspace (based on
* focus). Try not to use this function, particularly if there are multiple

View File

@@ -528,14 +528,3 @@ Blockly.inject.loadSounds_ = function(pathToMedia, workspace) {
Blockly.bindEventWithChecks_(document, 'touchstart', null, unbindSounds,
true));
};
/**
* Modify the block tree on the existing toolbox.
* @param {Node|string} tree DOM tree of blocks, or text representation of same.
* @deprecated April 2015
*/
Blockly.updateToolbox = function(tree) {
console.warn('Deprecated call to Blockly.updateToolbox, ' +
'use workspace.updateToolbox instead.');
Blockly.getMainWorkspace().updateToolbox(tree);
};