<commit_before>'use strict';

const BaseComponent = require(__dirname + '/../components/base.js');

class Tab extends BaseComponent {
	constructor(props) {
		super();

		this.props = props;
		this.webview = this.props.webview;

		this.init();
	}

	init() {
		this.$el = this.generateNodeFromTemplate(this.template());
		this.props.$root.appendChild(this.$el);

		this.registerListeners();
	}

	registerListeners() {
		this.$el.addEventListener('click', this.props.onClick);
		this.$el.addEventListener('mouseover', this.props.onHover);
		this.$el.addEventListener('mouseout', this.props.onHoverOut);
	}

	isLoading() {
		return this.webview.isLoading;
	}

	activate() {
		this.$el.classList.add('active');
		this.webview.load();
	}

	deactivate() {
		this.$el.classList.remove('active');
		this.webview.hide();
	}

	destroy() {
		this.$el.parentNode.removeChild(this.$el);
		this.webview.$el.parentNode.removeChild(this.webview.$el);
	}
}

module.exports = Tab;<commit_msg>components: Remove unused isLoading function from Tab.<commit_after>'use strict';

const BaseComponent = require(__dirname + '/../components/base.js');

class Tab extends BaseComponent {
	constructor(props) {
		super();

		this.props = props;
		this.webview = this.props.webview;

		this.init();
	}

	init() {
		this.$el = this.generateNodeFromTemplate(this.template());
		this.props.$root.appendChild(this.$el);

		this.registerListeners();
	}

	registerListeners() {
		this.$el.addEventListener('click', this.props.onClick);
		this.$el.addEventListener('mouseover', this.props.onHover);
		this.$el.addEventListener('mouseout', this.props.onHoverOut);
	}

	activate() {
		this.$el.classList.add('active');
		this.webview.load();
	}

	deactivate() {
		this.$el.classList.remove('active');
		this.webview.hide();
	}

	destroy() {
		this.$el.parentNode.removeChild(this.$el);
		this.webview.$el.parentNode.removeChild(this.webview.$el);
	}
}

module.exports = Tab;
{'fraction_non_alphanumeric': 0.1772609819121447, 'fraction_numerical': 0.0, 'mean_word_length': 4.5, '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': '798412', 'n_tokens_mistral': 685, 'n_tokens_neox': 645, 'n_words': 88}