diff --git a/src/core/document.c b/src/core/document.c index a7b6ccc..7c8500d 100644 --- a/src/core/document.c +++ b/src/core/document.c @@ -139,6 +139,7 @@ dom_exception _dom_document_initialise(dom_document *doc, return err; } + doc->is_html = false; doc->nodelists = NULL; doc->script_added_callback = NULL; doc->script_added_callback_ctx = NULL; diff --git a/src/core/document.h b/src/core/document.h index f09e3da..e480a01 100644 --- a/src/core/document.h +++ b/src/core/document.h @@ -68,6 +68,8 @@ struct dom_document { void* script_added_callback_ctx; dom_script_added_callback script_added_callback; + bool is_html; + /* Memoised event strings */ dom_string *_memo_domnodeinserted; /**< DOMNodeInserted */ dom_string *_memo_domnoderemoved; /**< DOMNodeRemoved */ diff --git a/src/html/html_document.c b/src/html/html_document.c index 1fd21f9..323bb95 100644 --- a/src/html/html_document.c +++ b/src/html/html_document.c @@ -127,6 +127,8 @@ dom_exception _dom_html_document_initialise(dom_html_document *doc, if (error != DOM_NO_ERR) return error; + doc->base.is_html = true; + doc->title = NULL; doc->referrer = NULL; doc->domain = NULL;