dom: remove processing instruction prototype

instead of CDATA.
This commit is contained in:
Pierre Tachoire
2023-12-11 15:46:33 +01:00
parent 1bc65583da
commit 4d5672330b

View File

@@ -2,12 +2,20 @@ const std = @import("std");
const parser = @import("../netsurf.zig");
const CharacterData = @import("character_data.zig").CharacterData;
// https://dom.spec.whatwg.org/#processinginstruction
pub const ProcessingInstruction = struct {
pub const Self = parser.ProcessingInstruction;
pub const prototype = *CharacterData;
// TODO for libdom processing instruction inherit from node.
// But the spec says it must inherit from CDATA.
// Moreover, inherit from Node causes also a crash with cloneNode.
// https://github.com/lightpanda-io/browsercore/issues/123
//
// In consequence, for now, we don't implement all these func for
// ProcessingInstruction.
//
//pub const prototype = *CharacterData;
pub const mem_guarantied = true;
pub fn get_target(self: *parser.ProcessingInstruction) ![]const u8 {