mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
dom: document.contentType with hardcoded value
This commit is contained in:
@@ -34,6 +34,12 @@ pub const Document = struct {
|
||||
return Element.toInterface(e);
|
||||
}
|
||||
|
||||
// TODO implement contentType
|
||||
pub fn get_contentType(self: *parser.Document) []const u8 {
|
||||
_ = self;
|
||||
return "text/html";
|
||||
}
|
||||
|
||||
// TODO implement compactMode
|
||||
pub fn get_compatMode(self: *parser.Document) []const u8 {
|
||||
_ = self;
|
||||
@@ -157,6 +163,11 @@ pub fn testExecFn(
|
||||
};
|
||||
try checkCases(js_env, &getCompatMode);
|
||||
|
||||
var getContentType = [_]Case{
|
||||
.{ .src = "document.contentType", .ex = "text/html" },
|
||||
};
|
||||
try checkCases(js_env, &getContentType);
|
||||
|
||||
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