(*--------------------------------------------------------------------------- Copyright (c) 2025 Anil Madhavapeddy . All rights reserved. SPDX-License-Identifier: MIT ---------------------------------------------------------------------------*) (* HTML5 DOM node types *) type doctype_data = { name : string option; public_id : string option; system_id : string option; } (** Source location for nodes *) type location = { line : int; column : int; end_line : int option; end_column : int option; } type quirks_mode = No_quirks | Quirks | Limited_quirks type node = { mutable name : string; mutable namespace : string option; (* None = html, Some "svg", Some "mathml" *) mutable attrs : (string * string) list; mutable children : node list; mutable parent : node option; mutable data : string; (* For text, comment nodes *) mutable template_content : node option; (* For