@@ -25,13 +25,7 @@ class ShadowDOM {
2525 constructor ( ) {
2626 throw new Error ( "Static class" ) ;
2727 }
28-
29- static setWebComponentRootOnHTML ( ) {
30- if ( window . ShadyDOM ) {
31- document . documentElement . setAttribute ( "data-sap-ui-wc-root" , "" ) ;
32- }
33- }
34-
28+
3529 static registerStyle ( theme , styleName , styleObj ) {
3630 if ( typeof ( styleObj ) === "object" && styleObj . _ ) {
3731 if ( ! styles . has ( theme ) ) {
@@ -78,7 +72,7 @@ class ShadowDOM {
7872
7973 // Create the shadow DOM root span
8074 rootSpan = d . createElement ( "span" ) ;
81- rootSpan . setAttribute ( "data-sap-ui-wc-placeholder " , "" ) ;
75+ rootSpan . setAttribute ( "data-sap-ui-wc-root " , "" ) ;
8276 shadowDOM = rootSpan ;
8377 } else {
8478 let template = this . _getTemplateFor ( theme , tag ) ;
@@ -90,12 +84,13 @@ class ShadowDOM {
9084 }
9185 shadowDOM = template . content . cloneNode ( true ) ;
9286
93- rootSpan = shadowDOM . querySelector ( "span[data-sap-ui-wc-placeholder]" ) ;
94- setupBrowser ( rootSpan ) ;
95- setupOS ( rootSpan ) ;
96- setupSystem ( rootSpan ) ;
87+ rootSpan = shadowDOM . querySelector ( "span[data-sap-ui-wc-root]" ) ;
9788 }
9889
90+ setupBrowser ( rootSpan ) ;
91+ setupOS ( rootSpan ) ;
92+ setupSystem ( rootSpan ) ;
93+
9994 if ( isCompact ) {
10095 rootSpan . classList . add ( "sapUiSizeCompact" ) ;
10196 }
@@ -212,7 +207,6 @@ class ShadowDOM {
212207
213208 // Create a root span
214209 let root = d . createElement ( "span" ) ;
215- root . setAttribute ( "data-sap-ui-wc-placeholder" , "" ) ;
216210 root . setAttribute ( "data-sap-ui-wc-root" , "" ) ;
217211
218212 template . content . appendChild ( root ) ;
0 commit comments