mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 07:31:47 +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);
|
return Element.toInterface(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO implement compactMode
|
||||||
|
pub fn get_compatMode(self: *parser.Document) []const u8 {
|
||||||
|
_ = self;
|
||||||
|
return "CSS1Compat";
|
||||||
|
}
|
||||||
|
|
||||||
// TODO implement characterSet
|
// TODO implement characterSet
|
||||||
pub fn get_characterSet(self: *parser.Document) []const u8 {
|
pub fn get_characterSet(self: *parser.Document) []const u8 {
|
||||||
_ = self;
|
_ = self;
|
||||||
@@ -146,6 +152,11 @@ pub fn testExecFn(
|
|||||||
};
|
};
|
||||||
try checkCases(js_env, &getCharacterSet);
|
try checkCases(js_env, &getCharacterSet);
|
||||||
|
|
||||||
|
var getCompatMode = [_]Case{
|
||||||
|
.{ .src = "document.compatMode", .ex = "CSS1Compat" },
|
||||||
|
};
|
||||||
|
try checkCases(js_env, &getCompatMode);
|
||||||
|
|
||||||
const tags = comptime parser.Tag.all();
|
const tags = comptime parser.Tag.all();
|
||||||
comptime var createElements: [(tags.len) * 2]Case = undefined;
|
comptime var createElements: [(tags.len) * 2]Case = undefined;
|
||||||
inline for (tags, 0..) |tag, i| {
|
inline for (tags, 0..) |tag, i| {
|
||||||
|
|||||||
Reference in New Issue
Block a user