mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
This commit is contained in:
@@ -74,6 +74,9 @@ Blockly.Extensions.register = function(name, initFn) {
|
||||
* registered.
|
||||
*/
|
||||
Blockly.Extensions.registerMixin = function(name, mixinObj) {
|
||||
if(!goog.isObject(mixinObj)){
|
||||
throw new Error('Error: Mixin "' + name + '" must be a object');
|
||||
}
|
||||
Blockly.Extensions.register(name, function() {
|
||||
this.mixin(mixinObj);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user