Commit 4ccc086
committed
Don’t clone node in handleRawHtml()
I don’t know why the code cloned the node before modifying it – there’s
no explanation of this in #2, and the rest of the code is happy to
modify nodes directly. However, this causes attribute binding on nodes
with v-html to have no effect – after handleRawHtml(), the original node
is skipped for further processing (isRemovedFromTheDom() returns true),
and even if it wasn’t, handling attributes on it wouldn’t have any
effect on the node that’s actually in the DOM now. Given that removing
the cloning doesn’t seem to break any tests, let’s just remove it and
add a test for attribute binding in conjunction with v-html.
Bug: T396633
Bug: T3966341 parent 4d3000d commit 4ccc086
2 files changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
| 322 | + | |
327 | 323 | | |
328 | 324 | | |
329 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
| |||
0 commit comments