<commit_before>import { revealElement } from "./lazyload.reveal";

const nativeLazyTags = ["IMG", "IFRAME"];

export const shouldUseNative = (settings, force) =>
	force || (settings.use_native && "loading" in HTMLImageElement.prototype);

export const loadAllNative = instance => {
	instance._elements.forEach(element => {
		if (nativeLazyTags.indexOf(element.tagName) === -1) {
			return;
		}
		element.setAttribute("loading", "lazy");
		revealElement(element, instance);
	});
};<commit_msg>Removed `force` option in `shouldUseNative`<commit_after>import { revealElement } from "./lazyload.reveal";

const nativeLazyTags = ["IMG", "IFRAME"];

export const shouldUseNative = settings =>
	settings.use_native && "loading" in HTMLImageElement.prototype;

export const loadAllNative = instance => {
	instance._elements.forEach(element => {
		if (nativeLazyTags.indexOf(element.tagName) === -1) {
			return;
		}
		element.setAttribute("loading", "lazy");
		revealElement(element, instance);
	});
};
{'fraction_non_alphanumeric': 0.15392354124748492, 'fraction_numerical': 0.002012072434607646, 'mean_word_length': 5.546052631578948, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3912506', 'n_tokens_mistral': 323, 'n_tokens_neox': 310, 'n_words': 64}