mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
LibWeb: Implement quirks mode detection
This allows us to determine which mode to render the page in. Exposes "doctype" and "compatMode" on Document. Exposes "name", "publicId" and "systemId" on DocumentType.
This commit is contained in:
parent
a5ecb9bd6b
commit
19d6884529
13 changed files with 196 additions and 6 deletions
|
@ -25,6 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <LibWeb/Bindings/DocumentWrapper.h>
|
||||
#include <LibWeb/Bindings/DocumentTypeWrapper.h>
|
||||
#include <LibWeb/Bindings/HTMLCanvasElementWrapper.h>
|
||||
#include <LibWeb/Bindings/HTMLImageElementWrapper.h>
|
||||
#include <LibWeb/Bindings/HTMLElementWrapper.h>
|
||||
|
@ -41,6 +42,8 @@ NodeWrapper* wrap(JS::GlobalObject& global_object, Node& node)
|
|||
{
|
||||
if (is<Document>(node))
|
||||
return static_cast<NodeWrapper*>(wrap_impl(global_object, to<Document>(node)));
|
||||
if (is<DocumentType>(node))
|
||||
return static_cast<NodeWrapper*>(wrap_impl(global_object, to<DocumentType>(node)));
|
||||
if (is<HTMLCanvasElement>(node))
|
||||
return static_cast<NodeWrapper*>(wrap_impl(global_object, to<HTMLCanvasElement>(node)));
|
||||
if (is<HTMLImageElement>(node))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue