File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -368,13 +368,14 @@ return (function () {
368368 return elemTop < window . innerHeight && elemBottom >= 0 ;
369369 }
370370
371- function bodyContains ( elt ) {
372- if ( elt . getRootNode ( ) instanceof ShadowRoot ) {
373- return getDocument ( ) . body . contains ( elt . getRootNode ( ) . host ) ;
374- } else {
375- return getDocument ( ) . body . contains ( elt ) ;
376- }
377- }
371+ function bodyContains ( elt ) {
372+ // IE Fix
373+ if ( elt . getRootNode && elt . getRootNode ( ) instanceof ShadowRoot ) {
374+ return getDocument ( ) . body . contains ( elt . getRootNode ( ) . host ) ;
375+ } else {
376+ return getDocument ( ) . body . contains ( elt ) ;
377+ }
378+ }
378379
379380 function splitOnWhitespace ( trigger ) {
380381 return trigger . trim ( ) . split ( / \s + / ) ;
Original file line number Diff line number Diff line change @@ -368,13 +368,14 @@ return (function () {
368368 return elemTop < window . innerHeight && elemBottom >= 0 ;
369369 }
370370
371- function bodyContains ( elt ) {
372- if ( elt . getRootNode ( ) instanceof ShadowRoot ) {
373- return getDocument ( ) . body . contains ( elt . getRootNode ( ) . host ) ;
374- } else {
375- return getDocument ( ) . body . contains ( elt ) ;
376- }
377- }
371+ function bodyContains ( elt ) {
372+ // IE Fix
373+ if ( elt . getRootNode && elt . getRootNode ( ) instanceof ShadowRoot ) {
374+ return getDocument ( ) . body . contains ( elt . getRootNode ( ) . host ) ;
375+ } else {
376+ return getDocument ( ) . body . contains ( elt ) ;
377+ }
378+ }
378379
379380 function splitOnWhitespace ( trigger ) {
380381 return trigger . trim ( ) . split ( / \s + / ) ;
Original file line number Diff line number Diff line change @@ -368,13 +368,14 @@ return (function () {
368368 return elemTop < window . innerHeight && elemBottom >= 0 ;
369369 }
370370
371- function bodyContains ( elt ) {
372- if ( elt . getRootNode ( ) instanceof ShadowRoot ) {
373- return getDocument ( ) . body . contains ( elt . getRootNode ( ) . host ) ;
374- } else {
375- return getDocument ( ) . body . contains ( elt ) ;
376- }
377- }
371+ function bodyContains ( elt ) {
372+ // IE Fix
373+ if ( elt . getRootNode && elt . getRootNode ( ) instanceof ShadowRoot ) {
374+ return getDocument ( ) . body . contains ( elt . getRootNode ( ) . host ) ;
375+ } else {
376+ return getDocument ( ) . body . contains ( elt ) ;
377+ }
378+ }
378379
379380 function splitOnWhitespace ( trigger ) {
380381 return trigger . trim ( ) . split ( / \s + / ) ;
Original file line number Diff line number Diff line change @@ -368,13 +368,14 @@ return (function () {
368368 return elemTop < window . innerHeight && elemBottom >= 0 ;
369369 }
370370
371- function bodyContains ( elt ) {
372- if ( elt . getRootNode ( ) instanceof ShadowRoot ) {
373- return getDocument ( ) . body . contains ( elt . getRootNode ( ) . host ) ;
374- } else {
375- return getDocument ( ) . body . contains ( elt ) ;
376- }
377- }
371+ function bodyContains ( elt ) {
372+ // IE Fix
373+ if ( elt . getRootNode && elt . getRootNode ( ) instanceof ShadowRoot ) {
374+ return getDocument ( ) . body . contains ( elt . getRootNode ( ) . host ) ;
375+ } else {
376+ return getDocument ( ) . body . contains ( elt ) ;
377+ }
378+ }
378379
379380 function splitOnWhitespace ( trigger ) {
380381 return trigger . trim ( ) . split ( / \s + / ) ;
You can’t perform that action at this time.
0 commit comments