mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
dom: add document.compatMode with hardcoded value
This commit is contained in:
@@ -34,6 +34,12 @@ pub const Document = struct {
|
||||
return Element.toInterface(e);
|
||||
}
|
||||
|
||||
// TODO implement compactMode
|
||||
pub fn get_compatMode(self: *parser.Document) []const u8 {
|
||||
_ = self;
|
||||
return "CSS1Compat";
|
||||
}
|
||||
|
||||
// TODO implement characterSet
|
||||
pub fn get_characterSet(self: *parser.Document) []const u8 {
|
||||
_ = self;
|
||||
@@ -146,6 +152,11 @@ pub fn testExecFn(
|
||||
};
|
||||
try checkCases(js_env, &getCharacterSet);
|
||||
|
||||
var getCompatMode = [_]Case{
|
||||
.{ .src = "document.compatMode", .ex = "CSS1Compat" },
|
||||
};
|
||||
try checkCases(js_env, &getCompatMode);
|
||||
|
||||
const tags = comptime parser.Tag.all();
|
||||
comptime var createElements: [(tags.len) * 2]Case = undefined;
|
||||
inline for (tags, 0..) |tag, i| {
|
||||
|
||||
Reference in New Issue
Block a user