mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
More field dispose (#3201)
* Dispose of element references in fields. * Fewer warnings
This commit is contained in:
@@ -113,6 +113,13 @@ Blockly.clipboardTypeCounts_ = null;
|
||||
*/
|
||||
Blockly.cache3dSupported_ = null;
|
||||
|
||||
/**
|
||||
* Blockly opaque event data used to unbind events when using
|
||||
* `Blockly.bindEvent_` and `Blockly.bindEventWithChecks_`.
|
||||
* @typedef {!Array.<!Array>}
|
||||
*/
|
||||
Blockly.EventData;
|
||||
|
||||
/**
|
||||
* Returns the dimensions of the specified SVG image.
|
||||
* @param {!Element} svg SVG image.
|
||||
@@ -455,7 +462,7 @@ Blockly.defineBlocksWithJsonArray = function(jsonArray) {
|
||||
* should prevent the default handler. False by default. If
|
||||
* opt_noPreventDefault is provided, opt_noCaptureIdentifier must also be
|
||||
* provided.
|
||||
* @return {!Array.<!Array>} Opaque data that can be passed to unbindEvent_.
|
||||
* @return {!Blockly.EventData} Opaque data that can be passed to unbindEvent_.
|
||||
*/
|
||||
Blockly.bindEventWithChecks_ = function(node, name, thisObject, func,
|
||||
opt_noCaptureIdentifier, opt_noPreventDefault) {
|
||||
@@ -521,7 +528,7 @@ Blockly.bindEventWithChecks_ = function(node, name, thisObject, func,
|
||||
* @param {string} name Event name to listen to (e.g. 'mousedown').
|
||||
* @param {Object} thisObject The value of 'this' in the function.
|
||||
* @param {!Function} func Function to call when event is triggered.
|
||||
* @return {!Array.<!Array>} Opaque data that can be passed to unbindEvent_.
|
||||
* @return {!Blockly.EventData} Opaque data that can be passed to unbindEvent_.
|
||||
*/
|
||||
Blockly.bindEvent_ = function(node, name, thisObject, func) {
|
||||
var wrapFunc = function(e) {
|
||||
|
||||
Reference in New Issue
Block a user