
## draw_focus_if_needed {#aspose.html.dom.Element}

If a given element is focused, this method draws a focus ring around the current path.



```python
def draw_focus_if_needed(self, element):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| element | [`Element`](/html/python-net/aspose.html.dom/element) | The element to check whether it is focused or not. |



### See Also
* module [`aspose.html.dom.canvas`](../../)
* class [`ICanvasRenderingContext2D`](/html/python-net/aspose.html.dom.canvas/icanvasrenderingcontext2d)
