HTML and CSS Reference
In-Depth Information
Drawing a Focus Ring
Digging further into the Canvas Specification, we find some functions that have not yet been
implemented. The drawCustomFocusRing() function applies to the Canvas current path and
is used for accessibility. The context.drawSystemFocusRing(element) function should al-
low the given element to have a focus ring drawn around the current default path. Currently,
almost no browsers support this function. Eventually, you should be able to apply this to the
Canvas and also check to see whether the focus ring should be displayed by using the follow-
ingfunction: var shouldDraw = context.drawCustomFocusRing(theCanvas); .Ifthisre-
turns true , a custom focus ring on the current path should be displayed.
Search WWH ::




Custom Search