internal XMLCtor(XML xml, object tag, int id, int arity) : base(xml, tag, id, arity) { this.lib = xml.lib; ActivatePrototypeMap (MAX_FUNCTION_ID); }
/// <summary> /// XML.prototype.copy ( ) /// /// The copy method returns a deep copy of this XML object with the /// internal [[Parent]] property set to null. /// /// See ECMA 13.4.4.11 /// </summary> internal object Copy() { XML xml = new XML (lib, UnderlyingNode.Clone ()); return xml; }
internal XMLCtor(XML xml, object tag, int id, int arity) : base(xml, tag, id, arity) { _lib = xml.lib; ActivatePrototypeMap(MaxFunctionId); }
/// <summary> /// XML.prototype.appendChild ( child ) /// /// The appendChild method appends the given child to the end of /// this XML objects properties and returns this XML object. /// /// See ECMA 13.4.4.3 /// </summary> internal XML AppendChild(object child) { if (underlyingNode is XmlDocument) { // For now a single document with just a <?pi?> cannot exist, so // at least one root element must be given. But appending to root // will raise an error so we'll "guess" that the user meant to append // the documentElement instead of the document. // HACK XML xml = new XML (lib, ((XmlDocument)underlyingNode).DocumentElement); xml.AppendChild (child); return this; } return InsertChildBefore (child, null); }
internal void Add (XML node) { m_Nodes.Add (node); }