/// <summary> /// 从索引移除一个元素 /// </summary> /// <param name="element"></param> protected void RemoveElement(IHtmlElement element) { ElementIndexes.ForAll(index => index.RemoveElement(element)); _elements.Remove(element); }
/// <summary> /// 索引内的元素移除一个属性 /// </summary> /// <param name="element">被移除属性的元素</param> /// <param name="attribute">移除的属性</param> protected void RemoveAttribute(IHtmlElement element, IHtmlAttribute attribute) { ElementIndexes.ForAll(index => index.RemoveAttribute(element, attribute)); }
/// <summary> /// 向索引添加一个元素 /// </summary> /// <param name="element"></param> protected void AddElement(IHtmlElement element) { ElementIndexes.ForAll(index => index.AddElement(element)); _elements.Add(element); }