예제 #1
0
 internal HtmlElementAttributeReader(HtmlElement element)
 {
     _element    = element;
     _attributes = _element.AttributeDictionary;
     // rebuild the style object
     _style = new HtmlStyle();
     if (_attributes.ContainsKey("style"))
     {
         _style.LoadDescriptors(_attributes["style"]);
     }
 }
예제 #2
0
 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);
 }
예제 #3
0
        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);
        }
예제 #4
0
파일: HtmlStyle.cs 프로젝트: OakRaven/ltaf
 internal HtmlStyle()
 {
     _descriptors = new HtmlAttributeDictionary();
 }