mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
The src IDL attribute was previously implemented as an inline getter that returned the raw attribute value. This broke spec semantics and sites like Telegram Web that rely on document.currentScript.src to compute Webpack’s publicPath. According to the HTML Standard: https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflecting-content-attributes-in-idl-attributes For URL-reflecting attributes: 1. If contentAttributeValue is null, then return the empty string. 2. Let urlString be the result of encoding-parsing-and-serializing a URL given contentAttributeValue, relative to element’s node document. 3. If urlString is not failure, then return urlString. This patch moves the getter to HTMLScriptElement.cpp and implements these steps.
3 lines
60 B
Text
3 lines
60 B
Text
is_string = true
|
|
has_protocol = true
|
|
ends_with_dummy = true
|