Example #1
0
		internal override void Load ()
		{
			Clear ();
			uint count;
			unmanagedNodes.getLength (out count);
			nodeCount = (int) count;
			nodes = new Node[count];
			for (int i = 0; i < count; i++) {
				nsIDOMNode node;
				unmanagedNodes.item ((uint) i, out node);
				nodes[i] = new Attribute (control, node as nsIDOMAttr);
			}
		}
Example #2
0
		internal override void Load ()
		{
			Clear ();
			uint count;
			unmanagedNodes.getLength (out count);
			Node[] tmpnodes = new Node[count];
			for (int i = 0; i < count;i++) {
				nsIDOMNode node;
				unmanagedNodes.item ((uint)i, out node);
				ushort type;
				node.getNodeType (out type);
				if (type == (ushort)NodeType.Element)
					tmpnodes[nodeCount++] = new HTMLElement (control, (nsIDOMHTMLElement)node);
			}
			nodes = new Node[nodeCount];
			Array.Copy (tmpnodes, nodes, nodeCount);
		}
Example #3
0
		public void Insert (int index, INode value) 
		{
			if (index > Count)
				index = nodeCount;
			INode[] tmp = new Node[nodeCount+1];
			if (index > 0)
				Array.Copy (nodes, 0, tmp, 0, index);
			tmp[index] = value;
			if (index < nodeCount)
				Array.Copy (nodes, index, tmp, index + 1, (nodeCount - index));
			nodes = tmp;
			nodeCount++;
		}