Incorporate shadowRoot in focus calculation.
Incorporate shadowRoot in focus calculation.

This adds a call to getRootNode to get either the Document or the
ShadowRoot to use when calculating whether the textarea has focus.

getRootNode is guarded for older browser compatibility (IE).

xtermjs/xterm.js,Tyriar/xterm.js,sourcelair/xterm.js,Tyriar/xterm.js,sourcelair/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js