mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Basic support for Document::contentType
Spec: http://dom.spec.whatwg.org/#dom-document-contenttype This is a subtask for #1428, #1510 and #1526.
This commit is contained in:
parent
539cf58f73
commit
1067da7df8
7 changed files with 49 additions and 14 deletions
|
@ -62,16 +62,13 @@ impl DOMImplementation {
|
|||
|
||||
// http://dom.spec.whatwg.org/#dom-domimplementation-createhtmldocument
|
||||
pub fn CreateHTMLDocument(&self, title: Option<DOMString>) -> AbstractDocument {
|
||||
// Step 1.
|
||||
// Step 1-2.
|
||||
let abstract_doc = HTMLDocument::new(self.owner);
|
||||
assert!(abstract_doc.document().doctype == HTML);
|
||||
|
||||
let abstract_node = AbstractNode::from_document(abstract_doc);
|
||||
assert!(abstract_node.type_id() == DocumentNodeTypeId(HTMLDocumentTypeId));
|
||||
|
||||
// Step 2.
|
||||
// FIXME: https://github.com/mozilla/servo/pull/1519
|
||||
|
||||
{
|
||||
// Step 3.
|
||||
let doc_type = DocumentType::new(~"html", None, None, abstract_doc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue