Resolve 106 warnings.

This commit is contained in:
Neil Fraser
2017-10-23 17:28:01 -07:00
committed by Neil Fraser
parent f992ea0f9c
commit 4262b09002
29 changed files with 154 additions and 145 deletions

View File

@@ -395,14 +395,14 @@ Blockly.defineBlocksWithJsonArray = function(jsonArray) {
* Bind an event to a function call. When calling the function, verifies that
* it belongs to the touch stream that is currently being processed, and splits
* multitouch events into multiple events as needed.
* @param {!Node} node Node upon which to listen.
* @param {!EventTarget} node Node upon which to listen.
* @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.
* @param {boolean} opt_noCaptureIdentifier True if triggering on this event
* @param {boolean=} opt_noCaptureIdentifier True if triggering on this event
* should not block execution of other event handlers on this touch or other
* simultaneous touches.
* @param {boolean} opt_noPreventDefault True if triggering on this event
* @param {boolean=} opt_noPreventDefault True if triggering on this event
* should prevent the default handler. False by default. If
* opt_noPreventDefault is provided, opt_noCaptureIdentifier must also be
* provided.
@@ -461,7 +461,7 @@ Blockly.bindEventWithChecks_ = function(node, name, thisObject, func,
* simultaneous event processing.
* @deprecated in favor of bindEventWithChecks_, but preserved for external
* users.
* @param {!Node} node Node upon which to listen.
* @param {!EventTarget} node Node upon which to listen.
* @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.
@@ -528,7 +528,7 @@ Blockly.unbindEvent_ = function(bindData) {
* @return {boolean} True if number, false otherwise.
*/
Blockly.isNumber = function(str) {
return !!str.match(/^\s*-?\d+(\.\d+)?\s*$/);
return /^\s*-?\d+(\.\d+)?\s*$/.test(str);
};
// IE9 does not have a console. Create a stub to stop errors.