1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:47:44 +00:00

LibWeb: Implement SVGUseElement#href

Required by Ruffle.
b196c8d1bc/web/packages/core/src/shadow-template.ts (L601-L602)
This commit is contained in:
Luke Wilde 2023-11-14 01:03:19 +00:00 committed by Andreas Kling
parent 968bec9844
commit 54972e3ceb
5 changed files with 178 additions and 2 deletions

View file

@ -0,0 +1,114 @@
---------------
use - no-xlink-href
---------------
element.href instanceof SVGAnimatedString -> true
element.href === element.href -> true
element.href.baseVal ->
element.href.animVal ->
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> null
element.getAttribute("href") -> null
setting baseVal...
done, new values:
element.href.baseVal -> testSet
element.href.animVal -> testSet
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> null
element.getAttribute("href") -> testSet
animVal should be readonly:
TypeError: Cannot set property 'animVal' of [object SVGAnimatedString]
---------------
use - explicit-xlink-href
---------------
element.href instanceof SVGAnimatedString -> true
element.href === element.href -> true
element.href.baseVal -> test1
element.href.animVal -> test1
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> test1
element.getAttribute("href") -> null
setting baseVal...
done, new values:
element.href.baseVal -> testSet
element.href.animVal -> testSet
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> testSet
element.getAttribute("href") -> null
animVal should be readonly:
TypeError: Cannot set property 'animVal' of [object SVGAnimatedString]
---------------
use - implicit-xlink-href
---------------
element.href instanceof SVGAnimatedString -> true
element.href === element.href -> true
element.href.baseVal -> test2
element.href.animVal -> test2
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> null
element.getAttribute("href") -> test2
setting baseVal...
done, new values:
element.href.baseVal -> testSet
element.href.animVal -> testSet
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> null
element.getAttribute("href") -> testSet
animVal should be readonly:
TypeError: Cannot set property 'animVal' of [object SVGAnimatedString]
---------------
textPath - no-xlink-href
---------------
element.href instanceof SVGAnimatedString -> true
element.href === element.href -> true
element.href.baseVal ->
element.href.animVal ->
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> null
element.getAttribute("href") -> null
setting baseVal...
done, new values:
element.href.baseVal -> testSet
element.href.animVal -> testSet
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> null
element.getAttribute("href") -> testSet
animVal should be readonly:
TypeError: Cannot set property 'animVal' of [object SVGAnimatedString]
---------------
textPath - explicit-xlink-href
---------------
element.href instanceof SVGAnimatedString -> true
element.href === element.href -> true
element.href.baseVal -> test1
element.href.animVal -> test1
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> test1
element.getAttribute("href") -> null
setting baseVal...
done, new values:
element.href.baseVal -> testSet
element.href.animVal -> testSet
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> testSet
element.getAttribute("href") -> null
animVal should be readonly:
TypeError: Cannot set property 'animVal' of [object SVGAnimatedString]
---------------
textPath - implicit-xlink-href
---------------
element.href instanceof SVGAnimatedString -> true
element.href === element.href -> true
element.href.baseVal -> test2
element.href.animVal -> test2
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> null
element.getAttribute("href") -> test2
setting baseVal...
done, new values:
element.href.baseVal -> testSet
element.href.animVal -> testSet
element.href.baseVal === element.href.animVal -> true
element.getAttribute("xlink:href") -> null
element.getAttribute("href") -> testSet
animVal should be readonly:
TypeError: Cannot set property 'animVal' of [object SVGAnimatedString]