File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,8 @@ if (typeof Slick === "undefined") {
112112 ffMaxSupportedCssHeight : 6000000 ,
113113 maxSupportedCssHeight : 1000000000 ,
114114 sanitizer : undefined , // sanitize function, built in basic sanitizer is: Slick.RegexSanitizer(dirtyHtml)
115- logSanitizedHtml : false // log to console when sanitised - recommend true for testing of dev and production
115+ logSanitizedHtml : false , // log to console when sanitised - recommend true for testing of dev and production
116+ shadowRoot : undefined
116117 } ;
117118
118119 var columnDefaults = {
@@ -2056,6 +2057,7 @@ if (typeof Slick === "undefined") {
20562057 _style = document . createElement ( 'style' ) ;
20572058 _style . nonce = 'random-string' ;
20582059 document . head . appendChild ( _style ) ;
2060+ ( options . shadowRoot || document . head ) . appendChild ( _style ) ;
20592061
20602062 const sheet = _style . sheet ;
20612063 if ( sheet ) {
@@ -2081,7 +2083,7 @@ if (typeof Slick === "undefined") {
20812083 function getColumnCssRules ( idx ) {
20822084 var i ;
20832085 if ( ! stylesheet ) {
2084- var sheets = document . styleSheets ;
2086+ var sheets = ( options . shadowRoot || document ) . styleSheets ;
20852087 for ( i = 0 ; i < sheets . length ; i ++ ) {
20862088 if ( ( sheets [ i ] . ownerNode || sheets [ i ] . owningElement ) == _style ) {
20872089 stylesheet = sheets [ i ] ;
You can’t perform that action at this time.
0 commit comments