FocusImplDefault class
class FocusImplDefault implements FocusImpl { /** * Remove focus from [Element]. */ void blur(dart_html.Element elem) { elem.blur(); } /** * Create focusable element. */ dart_html.Element createFocusable() { dart_html.DivElement div = new dart_html.DivElement(); div.attributes['tabIndex'] = '0'; return div; } /** * Set focus on [Element]. */ void focus(dart_html.Element elem) { elem.focus(); } /** * Return [Element] tab index. */ int getTabIndex(dart_html.Element elem) { return elem.tabIndex; } /** * Set [Element] tab [index]. */ void setTabIndex(dart_html.Element elem, int index) { elem.attributes['tabIndex'] = index.toString(); } /** * Set Access Key for keyboard navigation. */ void setAccessKey(dart_html.Element elem, int key) { // elem.accessKey = key.toString(); } }
Implements
Methods
void blur(Element elem) #
Remove focus from Element
.
void blur(dart_html.Element elem) { elem.blur(); }
Element createFocusable() #
Create focusable element.
dart_html.Element createFocusable() { dart_html.DivElement div = new dart_html.DivElement(); div.attributes['tabIndex'] = '0'; return div; }
void focus(Element elem) #
Set focus on Element
.
void focus(dart_html.Element elem) { elem.focus(); }
int getTabIndex(Element elem) #
Return Element
tab index.
int getTabIndex(dart_html.Element elem) { return elem.tabIndex; }
void setAccessKey(Element elem, int key) #
Set Access Key for keyboard navigation.
void setAccessKey(dart_html.Element elem, int key) { // elem.accessKey = key.toString(); }
void setTabIndex(Element elem, int index) #
Set Element
tab
index.
void setTabIndex(dart_html.Element elem, int index) { elem.attributes['tabIndex'] = index.toString(); }