internal HtmlElementAttributeReader(HtmlElement element) { _element = element; _attributes = _element.AttributeDictionary; // rebuild the style object _style = new HtmlStyle(); if (_attributes.ContainsKey("style")) { _style.LoadDescriptors(_attributes["style"]); } }
internal HtmlElement(string tagName, IDictionary <string, string> attributes, HtmlElement parentElement, HtmlPage parentPage) { _innerText = String.Empty; _tagName = tagName; _parentElement = parentElement; _parentPage = parentPage; _canUseTagIndexToLocate = false; _startPosition = -1; _endPosition = -1; _attributeDictionary = new HtmlAttributeDictionary(attributes); }
internal void RefreshAttributesDictionary() { if (_parentPage == null) { return; } BrowserCommand command = new BrowserCommand(BrowserCommand.FunctionNames.GetElementAttributes); command.Description = "GetElementAttributes"; command.Target = this.BuildBrowserCommandTarget(); command.Handler.RequiresElementFound = true; string data = _parentPage.ExecuteCommand(this, command).Data; HtmlElement tempElement = HtmlElement.Create(data, _parentPage, false); this._attributeDictionary = new HtmlAttributeDictionary(tempElement._attributeDictionary); }
internal HtmlStyle() { _descriptors = new HtmlAttributeDictionary(); }