mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-15 15:42:52 +00:00
We can't rely on Element.setAttribute() in cloneNode() since that will throw on weird attribute names. Instead, just follow the spec and copy attributes into cloned elements verbatim. This fixes a crash when loading the "issues" tab on GitHub repos. They are actually sending us unintentionally broken markup, but we should still support cloning it. :^)
9 lines
236 B
HTML
9 lines
236 B
HTML
<script src="../include.js"></script>
|
|
<svg><circle id=c a(></svg>
|
|
<script>
|
|
test(() => {
|
|
let cloned = c.cloneNode()
|
|
println(c.attributes[1].localName)
|
|
println(cloned.attributes[1].localName)
|
|
});
|
|
</script>
|