Created
May 16, 2014 21:43
-
-
Save edg2s/18b8879766d7ea45c6db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Focusable element. | |
* | |
* @abstract | |
* @class | |
* | |
* @constructor | |
*/ | |
OO.ui.FocusableElement = function OoUiFocusableElement() { | |
// add tabindex | |
}; | |
/* Methods */ | |
/** | |
* Get focusable element. | |
* | |
* @return {jQuery} Focusable element | |
*/ | |
OO.ui.FocusableElement.prototype.getFocusableElement = function () { | |
throw new Error( | |
'OO.ui.FocusableElement.getFocusableElement not implemented in this class:' + this.constructor | |
); | |
}; | |
/** | |
* Show popup. | |
*/ | |
OO.ui.FocusableElement.prototype.focus = function () { | |
this.getFocusableElement()[0].focus(); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment