[webkit-dev] How to get the background image of a node?
rniwa at google.com
Wed Aug 12 22:19:11 PDT 2009
2009/8/12 TianShijun <tiansjun at hotmail.com>
> Hi Simon,
> I cannot find this method in either Node.h or RenderStyle.h.
> I wonder that why we cannot get the attribute of an element node just by
> invoking some member function of the node?
Line 440 of Node.h
virtual RenderStyle* computedStyle();
This gives you renderStyle. If you do position.computedStyle(), you'll
A node could be anything, so you need to first check whether it's an HTML
element or not. You can do so by calling node->isElementNode().
Once node->isElementNode() returned, true, you cast the node into Element
and call getAttribute there as in:
*Please post the questions like this on webkit-help.*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev