@@ -25,13 +25,7 @@ class ShadowDOM {
25
25
constructor ( ) {
26
26
throw new Error ( "Static class" ) ;
27
27
}
28
-
29
- static setWebComponentRootOnHTML ( ) {
30
- if ( window . ShadyDOM ) {
31
- document . documentElement . setAttribute ( "data-sap-ui-wc-root" , "" ) ;
32
- }
33
- }
34
-
28
+
35
29
static registerStyle ( theme , styleName , styleObj ) {
36
30
if ( typeof ( styleObj ) === "object" && styleObj . _ ) {
37
31
if ( ! styles . has ( theme ) ) {
@@ -78,7 +72,7 @@ class ShadowDOM {
78
72
79
73
// Create the shadow DOM root span
80
74
rootSpan = d . createElement ( "span" ) ;
81
- rootSpan . setAttribute ( "data-sap-ui-wc-placeholder " , "" ) ;
75
+ rootSpan . setAttribute ( "data-sap-ui-wc-root " , "" ) ;
82
76
shadowDOM = rootSpan ;
83
77
} else {
84
78
let template = this . _getTemplateFor ( theme , tag ) ;
@@ -90,12 +84,13 @@ class ShadowDOM {
90
84
}
91
85
shadowDOM = template . content . cloneNode ( true ) ;
92
86
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]" ) ;
97
88
}
98
89
90
+ setupBrowser ( rootSpan ) ;
91
+ setupOS ( rootSpan ) ;
92
+ setupSystem ( rootSpan ) ;
93
+
99
94
if ( isCompact ) {
100
95
rootSpan . classList . add ( "sapUiSizeCompact" ) ;
101
96
}
@@ -212,7 +207,6 @@ class ShadowDOM {
212
207
213
208
// Create a root span
214
209
let root = d . createElement ( "span" ) ;
215
- root . setAttribute ( "data-sap-ui-wc-placeholder" , "" ) ;
216
210
root . setAttribute ( "data-sap-ui-wc-root" , "" ) ;
217
211
218
212
template . content . appendChild ( root ) ;
0 commit comments