<commit_before>/**
 * @namespace
 * @name Button
 */
BEM.DOM.decl('button', /** @lends Button.prototype */ {

    onSetMod : {

        'js' : function() {

            var disabled = this.isDisabled();

            (this._href = this.domElem.attr('href')) && disabled &&
                this.domElem.removeAttr('href');

            this.elem('input').attr('disabled', disabled);

        },

        'focused' : {

            'yes' : function() {

                if(this.isDisabled())
                    return false;

                var _this = this;

                this
                    .bindToWin('unload', function() {
                        _this.delMod('focused');
                    })
                    .bindTo('keydown', this._onKeyDown)
                
                _this.elem('input').is(':focus') || _this.elem('input').focus();

                this.afterCurrentEvent(function() {
                    this.trigger('gotfocus');
                });

            },

            '' : function() {

                this
                    .unbindFromWin('unload')
                    .unbindFrom('keydown')
                    .elem('input').blur();

                this.afterCurrentEvent(function() {
                    this.trigger('lostfocus');
                });

            }

        },

        'disabled' : function(modName, modVal) {

            var disable = modVal == 'yes',
                domElem = this.domElem;

            this._href && (disable?
                domElem.removeAttr('href') :
                domElem.attr('href', this._href));

            disable && domElem.keyup();

            this.afterCurrentEvent(function() {
                this.elem('input').attr('disabled', disable);
            });
<commit_msg>removed unused elem input from js<commit_after>/**
 * @namespace
 * @name Button
 */
BEM.DOM.decl('button', /** @lends Button.prototype */ {

    onSetMod : {

        'js' : function() {

            var disabled = this.isDisabled();

            (this._href = this.domElem.attr('href')) && disabled &&
                this.domElem.removeAttr('href');

            this.attr('disabled', disabled);

        },

        'focused' : {

            'yes' : function() {

                if(this.isDisabled())
                    return false;

                var _this = this;

                this
                    .bindToWin('unload', function() {
                        _this.delMod('focused');
                    })
                    .bindTo('keydown', this._onKeyDown)
                
                _this.is(':focus') || _this.focus();

                this.afterCurrentEvent(function() {
                    this.trigger('gotfocus');
                });

            },

            '' : function() {

                this
                    .unbindFromWin('unload')
                    .unbindFrom('keydown')
                    .blur();

                this.afterCurrentEvent(function() {
                    this.trigger('lostfocus');
                });

            }

        },

        'disabled' : function(modName, modVal) {

            var disable = modVal == 'yes',
                domElem = this.domElem;

            this._href && (disable?
                domElem.removeAttr('href') :
                domElem.attr('href', this._href));

            disable && domElem.keyup();

            this.afterCurrentEvent(function() {
                this.attr('disabled', disable);
            });

{'fraction_non_alphanumeric': 0.1398741418764302, 'fraction_numerical': 0.0, 'mean_word_length': 1.1653250773993808, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6062791', 'n_tokens_mistral': 936, 'n_tokens_neox': 836, 'n_words': 133}