mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
Merge pull request #122 from lightpanda-io/dom-processinginstruction-cdata
dom: processing instruction inherits from node
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user