This repository was archived by the owner on Sep 22, 2022. It is now read-only.
Commit 34db9c9
Ensure feature works when element was constructed in script
This is a workaround test case for src/preload not working for _elements
upgraded before parsed_. The cause is that at the time of
`attributeChangedCallback`, element does not have access to
parentElemet as they haven't been fully parsed and is not yet connected
to the DOM.
The parsing order is difficult to re-create in test, and even harder to
make explicit, so this test reproduce the issue by creating "a upgraded
details-dialog, not connected to the DOM at the time of attribute
setting".
Note:
`attributeChangedCallback` always happens before `connectedCallback`,
therefore this test will pass if the attribute is set after
`connectedCallback`, triggering another `attributeChangedCallback` which
binds the events.1 parent c1ebbba commit 34db9c9
1 file changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
236 | 266 | | |
237 | 267 | | |
238 | 268 | | |
| |||
0 commit comments