Commit b8aa270
committed
lazy-define: skip observe() work when nothing is pending
core.ts calls observe() for every shadow-root controller on connect. Once all
lazy definitions resolve (or when lazyDefine is never used), there is nothing to
watch for — the browser upgrades any already-defined element's instances
natively — so observe() can return immediately instead of creating/scanning/
disconnecting a MutationObserver per connect.1 parent 570e7e4 commit b8aa270
2 files changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
169 | 183 | | |
170 | 184 | | |
171 | 185 | | |
| |||
240 | 254 | | |
241 | 255 | | |
242 | 256 | | |
| 257 | + | |
| 258 | + | |
243 | 259 | | |
244 | 260 | | |
245 | 261 | | |
246 | 262 | | |
247 | 263 | | |
248 | | - | |
249 | 264 | | |
250 | 265 | | |
251 | 266 | | |
| |||
0 commit comments