Wednesday, June 12, 2013

Set attribute option element in OpenWebkitSharp

Here's how you set option element attribute using OpenWebKitSharp.
Code:
foreach (WebKit.DOMNode optionElement in nodeItem.ChildNodes)  
 {  
   if (searchInnerHtml && optionElement.TextContent.Equals(searchInnerString))  
   {  
       WebKit.InteropIDOMHTMLElement el =    
       (WebKit.Interop.IDOMHTMLElement)optionElement.GetWebKitObject();  
       el.setAttribute("selected", "selected");  
   }  
 }  

0 comments:

Post a Comment