Permalink
Browse files

add FocusPyJS.py

git-svn-id: https://pyjamas.svn.sourceforge.net/svnroot/pyjamas/trunk@666 7a2bd370-bda8-463c-979e-2900ccfb811e
  • Loading branch information...
lkcl
lkcl committed Jun 22, 2009
1 parent e25ec09 commit d4ea324fd3ea503342fbeb7e5154ecb893f4da4b
Showing with 34 additions and 0 deletions.
  1. +34 −0 library/pyjamas/ui/platform/FocusPyJS.py
@@ -0,0 +1,34 @@
def blur(elem):
JS("""
elem.blur();
""")
def createFocusable():
JS("""
var e = $doc.createElement("DIV");
e.tabIndex = 0;
return e;
""")
def focus(elem):
JS("""
elem.focus();
""")
def getTabIndex(elem):
JS("""
return elem.tabIndex;
""")
def setAccessKey(elem, key):
JS("""
elem.accessKey = key;
""")
def setTabIndex(elem, index):
JS("""
elem.tabIndex = index;
""")

0 comments on commit d4ea324

Please sign in to comment.