.net - How to access Pseudo Elements (:before, :after, etc) or Pseudo Classes (:hover, :visited, etc) using MSHTML? -



.net - How to access Pseudo Elements (:before, :after, etc) or Pseudo Classes (:hover, :visited, etc) using MSHTML? -

i'm parsing document mshtml , need determine pseudo elements in document. right have reference ihtmlelement in .net code , need determine if element has pseudo elements such "before" or "after" applied it.

for example, in illustration document code below, have reference clearfloat div (as ihtmlelement, mshtml .net code) , need determine pseudo element's "after" style is. how can mshtml?

<style type="text/css"> .clearfloat:after { display: block; visibility: hidden; clear: both; height: 0; content: "."; } </style> <div class="clearfloat"> text... </div>

more mutual pseudo classes, such ":hover". cannot figure out how determine :hover style. need pseudo elements, i'm hoping if can figure out how access pseudo classes might yield clue accessing pseudo elements.

does know how access pseudo classes or elements mshtml?

thanks :)

you can style sheets in ihtmldocument2 interface: reference: microsoft.mshtml (or utilize reflection)

webbrowser browser; ... ihtmldocument2 doc2=browser.document.domdocument ihtmldocument2; if(doc2!=null) { int32 index=doc2.stylesheets.length-1; ihtmlstylesheet style = doc2.stylesheets.item(index); int32 ruleindex=style.rules.length-1; string selector = style.rules.item(ruleindex).selectortext; messagebox(string.format("last selector in lastly style sheet: {0}",selector)); }

.net css internet-explorer mshtml

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -