mirror of
				https://github.com/lightpanda-io/browser.git
				synced 2025-10-30 15:41:48 +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); |         return Element.toInterface(e); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     // TODO implement contentType | ||||||
|  |     pub fn get_contentType(self: *parser.Document) []const u8 { | ||||||
|  |         _ = self; | ||||||
|  |         return "text/html"; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     // TODO implement compactMode |     // TODO implement compactMode | ||||||
|     pub fn get_compatMode(self: *parser.Document) []const u8 { |     pub fn get_compatMode(self: *parser.Document) []const u8 { | ||||||
|         _ = self; |         _ = self; | ||||||
| @@ -157,6 +163,11 @@ pub fn testExecFn( | |||||||
|     }; |     }; | ||||||
|     try checkCases(js_env, &getCompatMode); |     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(); |     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
	 Pierre Tachoire
					Pierre Tachoire