I have the following problem : in my GWT project there is a "main" css file for the application, inline css in the DOM that come from the application computation and a css file that is bundled in an archive uploaded to the application and dynamically loaded.
Now I need for an Element
to find which CSS rules are applied, coming from either of the three sources. As I understand, GWT's getStyle()
function only returns informations that are in the DOM.
What's the simplest way to achieve this ?
Edit : If possible, I search for a client-side solution (in java or javascript) rat开发者_如何学编程her than a server-side one.
Found a solution to my problem (in fact two but I'm going for the first) :
- Using jQuery's css() that does what I wanted
- A pure javascript solution in this SO question
I now just have to write a JNSI wrapper for the jQuery function...
Edit : Found a third solution which correspond exactly to what I want : GQuery which is a port of jQuery to GWT and contains (according to the main page) 98% of jQuery's core functionalities.
精彩评论