index.js
function addText() {

  // Add title
  dialogEl.querySelector( '#dialog-title' ).innerHTML = options.title

  // Add optional description
  var descriptionEl = dialogEl.querySelector( '#dialog-description' )

  if ( options.description ) {
    descriptionEl.innerHTML = options.description
  } else {
    descriptionEl.parentElement.removeChild( descriptionEl )
    dialogEl.removeAttribute( 'aria-labelledby' )
  }

}
function addText() {

  // Add title
  dialogEl.querySelector( '#dialog-title' ).innerHTML = options.title

  // Add optional description
  var descriptionEl = dialogEl.querySelector( '#dialog-description' )

  if ( options.description ) {
    descriptionEl.innerHTML = options.description
  } else {
    descriptionEl.parentElement.removeChild( descriptionEl )
    dialogEl.removeAttribute( 'aria-labelledby' )
  }

}
function addText ( ) { // Add title dialogEl . querySelector ( '#dialog-title' ) . innerHTML = options . title // Add optional description var descriptionEl = dialogEl . querySelector ( '#dialog-description' ) if ( options . description ) { descriptionEl . innerHTML = options . description } else { descriptionEl . parentElement . removeChild ( descriptionEl ) dialogEl . removeAttribute ( 'aria-labelledby' ) } }
Add title and description from options
Add title and description from options