From: Rural H. <rur...@gm...> - 2017-06-20 07:34:53
|
Hi, Does htmlunit support the CSS pseudo elements ::before and ::after? If yes, how to get it on the html element? |
From: Ronald B. <rb...@rb...> - 2017-06-26 16:01:43
|
Hi Rural, not sure what you are looking for. Maybe ask the element for the computed css style and then check for the attribute.... On Tue, 20 Jun 2017 15:34:39 +0800 Rural Hunter wrote: > >Hi, > >Does htmlunit support the CSS pseudo elements ::before and ::after? If yes, how to get it on the html element? > > >----------------------------------------------------------------------- ------- >Check out the vibrant tech community on one of the world's most >engaging tech sites, Slashdot.org! http://sdm.link/slashdot >_______________________________________________ >Htmlunit-user mailing list >Htm...@li... >https://lists.sourceforge.net/lists/listinfo/htmlunit-user > |
From: Rural H. <rur...@gm...> - 2017-06-27 01:44:08
|
Thanks Ronald. I already get it working like this: HTMLElement element=(HTMLElement)he.getScriptableObject(); ComputedCSSStyleDeclaration style=jscript.getComputedStyle(element, ":before"); The important thing is the pseudo parameter of getComputedStyle method has to be ":before", not "before" or "::before". I think this should be documented. 在 2017/6/27 0:01, Ronald Brill 写道: > Hi Rural, > > not sure what you are looking for. Maybe ask the element for the computed css style and > then check for the attribute.... > > On Tue, 20 Jun 2017 15:34:39 +0800 Rural Hunter wrote: >> Hi, >> >> Does htmlunit support the CSS pseudo elements ::before and ::after? If yes, how to get it > on the html element? >> >> ----------------------------------------------------------------------- > ------- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >> > |
From: Ronald B. <rb...@rb...> - 2017-06-27 16:32:16
|
Ok you are rigth - at least partly ;-) Have updated the documentation -> please check if this is sufficient for you. This method is there for js support so i have added one more test. Looks like the browsers can handle ':before' and '::before'. This is now also fixed, we are in sync with the browsers now. Thanks for your report RBRi On Tue, 27 Jun 2017 09:43:55 +0800 Rural Hunter wrote: > >Thanks Ronald. I already get it working like this: > HTMLElement element=(HTMLElement)he.getScriptableObject(); > ComputedCSSStyleDeclaration style=jscript.getComputedStyle(element, ":before"); >The important thing is the pseudo parameter of getComputedStyle method has to be ":before", not "before" or "::before". I think this should be documented. > >ÔÚ 2017/6/27 0:01, Ronald Brill ??µ?: >>Hi Rural, >> >>not sure what you are looking for. Maybe ask the element for the computed css style and >>then check for the attribute.... >> >>On Tue, 20 Jun 2017 15:34:39 +0800 Rural Hunter wrote: >>>Hi, >>> >>>Does htmlunit support the CSS pseudo elements ::before and ::after? If yes, how to get it >>on the html element? >>> >>>----------------------------------------------------------------------- >>------- >>>Check out the vibrant tech community on one of the world's most >>>engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>_______________________________________________ >>>Htmlunit-user mailing list >>>Htm...@li... >>>https://lists.sourceforge.net/lists/listinfo/htmlunit-user >>> >> > > |
From: Rural H. <rur...@gm...> - 2017-06-28 01:42:06
|
Hi Ronald, Thanks a lot. That's enough for me. :) 在 2017/6/28 0:31, Ronald Brill 写道: > Ok you are rigth - at least partly ;-) > > Have updated the documentation -> please check if this is sufficient for you. > > This method is there for js support so i have added one more test. Looks like the browsers can handle ':before' and '::before'. This is now also fixed, we are in sync with the browsers now. > > Thanks for your report > > RBRi > > On Tue, 27 Jun 2017 09:43:55 +0800 Rural Hunter wrote: >> Thanks Ronald. I already get it working like this: >> HTMLElement element=(HTMLElement)he.getScriptableObject(); >> ComputedCSSStyleDeclaration style=jscript.getComputedStyle(element, ":before"); >> The important thing is the pseudo parameter of getComputedStyle method has to be ":before", not "before" or "::before". I think this should be documented. >> >> ÔÚ 2017/6/27 0:01, Ronald Brill ??µ?: >>> Hi Rural, >>> >>> not sure what you are looking for. Maybe ask the element for the computed css style and >>> then check for the attribute.... >>> >>> On Tue, 20 Jun 2017 15:34:39 +0800 Rural Hunter wrote: >>>> Hi, >>>> >>>> Does htmlunit support the CSS pseudo elements ::before and ::after? If yes, how to get it >>> on the html element? >>>> ----------------------------------------------------------------------- >>> ------- >>>> Check out the vibrant tech community on one of the world's most >>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>>> _______________________________________________ >>>> Htmlunit-user mailing list >>>> Htm...@li... >>>> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >>>> >> > |