chore: makes types of divs more specific (#5988)

* chore: cast to a more specific type when creating a div

* chore: make types more specific for divs

* chore: format
This commit is contained in:
Rachel Fenichel
2022-03-08 16:00:31 -08:00
committed by GitHub
parent e11b5834e5
commit 3740d51089
11 changed files with 67 additions and 54 deletions

View File

@@ -403,11 +403,11 @@ const measureFontMetrics = function(text, fontSize, fontWeight, fontFamily) {
span.style.font = fontWeight + ' ' + fontSize + ' ' + fontFamily;
span.textContent = text;
const block = document.createElement('div');
const block = /** @type {!HTMLDivElement} */ (document.createElement('div'));
block.style.width = '1px';
block.style.height = 0;
const div = document.createElement('div');
const div = /** @type {!HTMLDivElement} */ (document.createElement('div'));
div.setAttribute('style', 'position: fixed; top: 0; left: 0; display: flex;');
div.appendChild(span);
div.appendChild(block);