// Copyright © 2020 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. namespace CefSharp.DevTools.DOM { /// /// DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. /// DOMNode is a base node mirror type. /// [System.Runtime.Serialization.DataContractAttribute] public class Node : CefSharp.DevTools.DevToolsDomainEntityBase { /// /// Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend /// will only push node with given `id` once. It is aware of all requested nodes and will only /// fire DOM events for nodes known to the client. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("nodeId"), IsRequired = (true))] public int NodeId { get; set; } /// /// The id of the parent node if any. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("parentId"), IsRequired = (false))] public int? ParentId { get; set; } /// /// The BackendNodeId for this node. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("backendNodeId"), IsRequired = (true))] public int BackendNodeId { get; set; } /// /// `Node`'s nodeType. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("nodeType"), IsRequired = (true))] public int NodeType { get; set; } /// /// `Node`'s nodeName. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("nodeName"), IsRequired = (true))] public string NodeName { get; set; } /// /// `Node`'s localName. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("localName"), IsRequired = (true))] public string LocalName { get; set; } /// /// `Node`'s nodeValue. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("nodeValue"), IsRequired = (true))] public string NodeValue { get; set; } /// /// Child count for `Container` nodes. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("childNodeCount"), IsRequired = (false))] public int? ChildNodeCount { get; set; } /// /// Child nodes of this node when requested with children. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("children"), IsRequired = (false))] public System.Collections.Generic.IList Children { get; set; } /// /// Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("attributes"), IsRequired = (false))] public string[] Attributes { get; set; } /// /// Document URL that `Document` or `FrameOwner` node points to. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("documentURL"), IsRequired = (false))] public string DocumentURL { get; set; } /// /// Base URL that `Document` or `FrameOwner` node uses for URL completion. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("baseURL"), IsRequired = (false))] public string BaseURL { get; set; } /// /// `DocumentType`'s publicId. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("publicId"), IsRequired = (false))] public string PublicId { get; set; } /// /// `DocumentType`'s systemId. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("systemId"), IsRequired = (false))] public string SystemId { get; set; } /// /// `DocumentType`'s internalSubset. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("internalSubset"), IsRequired = (false))] public string InternalSubset { get; set; } /// /// `Document`'s XML version in case of XML documents. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("xmlVersion"), IsRequired = (false))] public string XmlVersion { get; set; } /// /// `Attr`'s name. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("name"), IsRequired = (false))] public string Name { get; set; } /// /// `Attr`'s value. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("value"), IsRequired = (false))] public string Value { get; set; } /// /// Pseudo element type for this node. /// public CefSharp.DevTools.DOM.PseudoType? PseudoType { get { return (CefSharp.DevTools.DOM.PseudoType? )(StringToEnum(typeof(CefSharp.DevTools.DOM.PseudoType? ), pseudoType)); } set { pseudoType = (EnumToString(value)); } } /// /// Pseudo element type for this node. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("pseudoType"), IsRequired = (false))] internal string pseudoType { get; set; } /// /// Shadow root type. /// public CefSharp.DevTools.DOM.ShadowRootType? ShadowRootType { get { return (CefSharp.DevTools.DOM.ShadowRootType? )(StringToEnum(typeof(CefSharp.DevTools.DOM.ShadowRootType? ), shadowRootType)); } set { shadowRootType = (EnumToString(value)); } } /// /// Shadow root type. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("shadowRootType"), IsRequired = (false))] internal string shadowRootType { get; set; } /// /// Frame ID for frame owner elements. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("frameId"), IsRequired = (false))] public string FrameId { get; set; } /// /// Content document for frame owner elements. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("contentDocument"), IsRequired = (false))] public CefSharp.DevTools.DOM.Node ContentDocument { get; set; } /// /// Shadow root list for given element host. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("shadowRoots"), IsRequired = (false))] public System.Collections.Generic.IList ShadowRoots { get; set; } /// /// Content document fragment for template elements. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("templateContent"), IsRequired = (false))] public CefSharp.DevTools.DOM.Node TemplateContent { get; set; } /// /// Pseudo elements associated with this node. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("pseudoElements"), IsRequired = (false))] public System.Collections.Generic.IList PseudoElements { get; set; } /// /// Import document for the HTMLImport links. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("importedDocument"), IsRequired = (false))] public CefSharp.DevTools.DOM.Node ImportedDocument { get; set; } /// /// Distributed nodes for given insertion point. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("distributedNodes"), IsRequired = (false))] public System.Collections.Generic.IList DistributedNodes { get; set; } /// /// Whether the node is SVG. /// [System.Runtime.Serialization.DataMemberAttribute(Name = ("isSVG"), IsRequired = (false))] public bool? IsSVG { get; set; } } }