mirror of
https://github.com/google/blockly.git
synced 2026-01-10 18:37:09 +01:00
Clean up get/set accessor definitions (#5488)
* Use Object.defineProperties instead of .defineProperty when installing get and set accessors for previously-mutable exports. * Add entries to renamings.js where feasible (i.e., for static rather than instance properties). (Don't do blockly.js yet, to avoid merge conflicts.)
This commit is contained in:
committed by
GitHub
parent
28fadf8c15
commit
dbf10cf167
@@ -86,6 +86,27 @@ const renamings = {
|
||||
// Blockly.common.getMainWorkspace().hideChaff(). See PR #5460.
|
||||
},
|
||||
},
|
||||
'Blockly.ContextMenu': {
|
||||
exports: {
|
||||
currentBlock: {get: 'getCurrentBlock', set: 'setCurrentBlock'},
|
||||
},
|
||||
},
|
||||
'Blockly.Events': {
|
||||
exports: {
|
||||
recordUndo: {get: 'getRecordUndo', set: 'setRecordUndo'},
|
||||
},
|
||||
},
|
||||
'Blockly.Tooltip': {
|
||||
exports: {
|
||||
DIV: {get: 'getDiv', set: 'setDiv'},
|
||||
visible: {get: 'isVisible'},
|
||||
},
|
||||
},
|
||||
'Blockly.WidgetDiv': {
|
||||
exports: {
|
||||
DIV: {get: 'getDiv'},
|
||||
},
|
||||
},
|
||||
'Blockly.utils': {
|
||||
exports: {
|
||||
genUid: {module: 'Blockly.utils.idGenerator'},
|
||||
|
||||
Reference in New Issue
Block a user