src/speech.js
/**
	 * Initialize.
	 *
	 * See destroy method for inverse.
	 */
Initialize.
See destroy method for inverse.
Initialize . See destroy method for inverse .
initialize() {
		this.chunkify();
		this.injectControls();
		this.setupStateMachine();
		document.addEventListener( 'selectionchange', this.updateContainsSelectionState );
		document.addEventListener( 'keydown', this.handleEscapeKeydown );
		this.isDialogSupported = 'showModal' in document.createElement( 'dialog' ) || 'undefined' !== typeof dialogPolyfill;
		this.renderControls();
		this.on( 'change', this.renderControls );
	}
initialize ( ) { this . chunkify ( ) ; this . injectControls ( ) ; this . setupStateMachine ( ) ; document . addEventListener ( 'selectionchange' , this . updateContainsSelectionState ) ; document . addEventListener ( 'keydown' , this . handleEscapeKeydown ) ; this . isDialogSupported = 'showModal' in document . createElement ( 'dialog' ) || 'undefined' !== typeof dialogPolyfill ; this . renderControls ( ) ; this . on ( 'change' , this . renderControls ) ; }
Initialize.
Initialize .
// @todo Also if focus removed from container? // @todo Add mutationObserver for this element to call this.chunkify() again.