mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Update src/href attributes to be a USVString
The following IDLs have the src/href attributes typed as a DOMString while in the spec the attribute has been updated to be a USVString: - HTMLIFrameElement - HTMLImageElement - HTMLInputElement - HTMLLinkElement - HTMLMediaElement - HTMLScriptElement
This commit is contained in:
parent
1e983d86c0
commit
c46508e497
16 changed files with 127 additions and 73 deletions
|
@ -16,7 +16,7 @@ use crate::dom::bindings::refcounted::Trusted;
|
|||
use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot, MutNullableDom, RootedReference};
|
||||
use crate::dom::bindings::settings_stack::is_execution_stack_empty;
|
||||
use crate::dom::bindings::str::DOMString;
|
||||
use crate::dom::bindings::str::{DOMString, USVString};
|
||||
use crate::dom::characterdata::CharacterData;
|
||||
use crate::dom::comment::Comment;
|
||||
use crate::dom::document::{Document, DocumentSource, HasBrowsingContext, IsHTMLDocument};
|
||||
|
@ -722,7 +722,7 @@ impl FetchResponseListener for ParserContext {
|
|||
let doc = &parser.document;
|
||||
let doc_body = DomRoot::upcast::<Node>(doc.GetBody().unwrap());
|
||||
let img = HTMLImageElement::new(local_name!("img"), None, doc);
|
||||
img.SetSrc(DOMString::from(self.url.to_string()));
|
||||
img.SetSrc(USVString(self.url.to_string()));
|
||||
doc_body
|
||||
.AppendChild(&DomRoot::upcast::<Node>(img))
|
||||
.expect("Appending failed");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue