Debian Codegraph @

ui/tabbable.js

raw symbols SCIP
1 /*!
2 * jQuery UI Tabbable 1.14.2
3 * https://jqueryui.com
4 *
5 * Copyright OpenJS Foundation and other contributors
6 * Released under the MIT license.
7 * https://jquery.org/license
8 */
9
10 //>>label: :tabbable Selector
11 //>>group: Core
12 //>>description: Selects elements which can be tabbed to.
13 //>>docs: https://api.jqueryui.com/tabbable-selector/
14
15 ( function( factory ) {
16 "use strict";
17
18 if ( typeof define === "function" && define.amd ) {
19
20 // AMD. Register as an anonymous module.
21 define( [ "jquery", "./version", "./focusable" ], factory );
22 } else {
23
24 // Browser globals
25 factory( jQuery );
26 }
27 } )( function( $ ) {
28 "use strict";
29
30 return $.extend( $.expr.pseudos, {
31 tabbable: function( element ) {
32 var tabIndex = $.attr( element, "tabindex" ),
33 hasTabindex = tabIndex != null;
34 return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );
35 }
36 } );
37
38 } );