mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02: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:
Notes:
sideshowbarker
2024-07-19 04:42:11 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/19d6884529d Pull-request: https://github.com/SerenityOS/serenity/pull/2842
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user