Use Element type instead of Node for an html element

This commit is contained in:
Frederic Junod
2018-03-09 16:59:58 +01:00
parent 6b07646129
commit 2e34421c71
4 changed files with 36 additions and 36 deletions

View File

@@ -58,7 +58,7 @@ const Attribution = function(opt_options) {
if (typeof collapseLabel === 'string') {
/**
* @private
* @type {Node}
* @type {Element}
*/
this.collapseLabel_ = document.createElement('span');
this.collapseLabel_.textContent = collapseLabel;
@@ -71,7 +71,7 @@ const Attribution = function(opt_options) {
if (typeof label === 'string') {
/**
* @private
* @type {Node}
* @type {Element}
*/
this.label_ = document.createElement('span');
this.label_.textContent = label;

View File

@@ -64,7 +64,7 @@ const FullScreen = function(opt_options) {
/**
* @private
* @type {Node}
* @type {Element}
*/
this.labelNode_ = typeof label === 'string' ?
document.createTextNode(label) : label;
@@ -73,7 +73,7 @@ const FullScreen = function(opt_options) {
/**
* @private
* @type {Node}
* @type {Element}
*/
this.labelActiveNode_ = typeof labelActive === 'string' ?
document.createTextNode(labelActive) : labelActive;
@@ -217,7 +217,7 @@ function isFullScreen() {
/**
* Request to fullscreen an element.
* @param {Node} element Element to request fullscreen
* @param {Element} element Element to request fullscreen
*/
function requestFullScreen(element) {
if (element.requestFullscreen) {
@@ -233,7 +233,7 @@ function requestFullScreen(element) {
/**
* Request to fullscreen an element with keyboard input.
* @param {Node} element Element to request fullscreen
* @param {Element} element Element to request fullscreen
*/
function requestFullScreenWithKeys(element) {
if (element.mozRequestFullScreenWithKeys) {

View File

@@ -74,7 +74,7 @@ const OverviewMap = function(opt_options) {
if (typeof collapseLabel === 'string') {
/**
* @private
* @type {Node}
* @type {Element}
*/
this.collapseLabel_ = document.createElement('span');
this.collapseLabel_.textContent = collapseLabel;
@@ -88,7 +88,7 @@ const OverviewMap = function(opt_options) {
if (typeof label === 'string') {
/**
* @private
* @type {Node}
* @type {Element}
*/
this.label_ = document.createElement('span');
this.label_.textContent = label;