mirror of
https://github.com/scratchfoundation/scratch-blocks.git
synced 2025-08-20 18:09:43 -04:00
Convert string tag name to goog.dom.TagName (#515)
in createDom calls only. This improves the type information of the created objects.
This commit is contained in:
parent
e03b191f73
commit
88eac2480b
4 changed files with 12 additions and 4 deletions
core
|
@ -28,6 +28,7 @@ goog.provide('Blockly.Toolbox');
|
|||
|
||||
goog.require('Blockly.Flyout');
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.dom.TagName');
|
||||
goog.require('goog.events');
|
||||
goog.require('goog.events.BrowserFeature');
|
||||
goog.require('goog.html.SafeHtml');
|
||||
|
@ -147,7 +148,8 @@ Blockly.Toolbox.prototype.init = function() {
|
|||
var svg = this.workspace_.getParentSvg();
|
||||
|
||||
// Create an HTML container for the Toolbox menu.
|
||||
this.HtmlDiv = goog.dom.createDom('div', 'blocklyToolboxDiv');
|
||||
this.HtmlDiv =
|
||||
goog.dom.createDom(goog.dom.TagName.DIV, 'blocklyToolboxDiv');
|
||||
this.HtmlDiv.setAttribute('dir', workspace.RTL ? 'RTL' : 'LTR');
|
||||
svg.parentNode.insertBefore(this.HtmlDiv, svg);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue