This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Commit 10973c3
committed
fix($compile): work around Firefox
DOM nodes passed to `compilationGenerator()` will eventually be wrapped
in `jqLite`, when the compilation actually happens. In Firefox 60+,
there seems to be a `DocumentFragment`-related bug that sometimes causes
the `childNodes` to be empty at the time the compilation happens.
This commit works around this bug by eagerly wrapping `childNodes` in
`jqLite`.
NOTE:
The wrapped nodes have references to their `DocumentFragment` container.
This is "by design", since we want to be able to traverse the nodes via
`nextSibling` (in order to correctly handle multi-element directives).
Once the nodes are compiled, they will be either moved to a new
container element or the `jqLite` wrapper is release making them
eligible for garbage collection. In both cases, the original
`DocumentFragment` container should be eligible for garbage collection
too.
Fixes #16607
Closes #16615DocumentFragment bug1 parent fc64e68 commit 10973c3
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2619 | 2619 | | |
2620 | 2620 | | |
2621 | 2621 | | |
2622 | | - | |
| 2622 | + | |
| 2623 | + | |
2623 | 2624 | | |
2624 | 2625 | | |
2625 | 2626 | | |
2626 | | - | |
| 2627 | + | |
2627 | 2628 | | |
2628 | 2629 | | |
2629 | 2630 | | |
| |||
0 commit comments