Migrate core/widgetdiv.js to goog.module syntax (#5331)

* Migrate core/widgetdiv.js to ES6 const/let

* Migrate core/widgetdiv.js to goog.module

* Migrate core/widgetdiv.js to named requires

* clang-format core/widgetdiv.js

* Mark WidgetDiv.DIV as deprecated and refactor callers to use setters/getters

* Fix deprecation date

* Refactor tests to make setDiv() in core/widgetdiv.js test-only

* Fix type annotations for WidgetDiv.DIV and move test cleanup into sharedTestTeardown
This commit is contained in:
Aaron Dodson
2021-08-16 10:23:50 -07:00
committed by GitHub
parent 26195a6d9c
commit 9046ce165b
9 changed files with 133 additions and 96 deletions

View File

@@ -168,7 +168,7 @@ suite('Text Input Fields', function() {
};
field.clickTarget_ = document.createElement('div');
Blockly.mainWorkspace = workspace;
Blockly.WidgetDiv.DIV = document.createElement('div');
Blockly.WidgetDiv.createDom();
this.stub = sinon.stub(field, 'resizeEditor_');
};