Logo
Explore Help
Register Sign In
iLoveElysia/pjax
1
0
Fork 0
You've already forked pjax
Code Issues Pull Requests Actions Packages Projects Releases 9 Wiki Activity
Files
6451fd8b82cf5f4dfa2b114be490f760fd5e2829
pjax/lib/foreach-els.js

14 lines
316 B
JavaScript
Raw Normal View History

Cleanup & travis (should break)
2014-10-14 11:42:36 +02:00
/* global HTMLCollection: true */
Test forEachEls
2014-05-04 08:45:05 +02:00
module.exports = function(els, fn, context) {
Switch linting to ESLint and Prettier (#191) * Switch linting to ESLint and Prettier * Clean up config * Prettier fixes
2019-02-13 22:26:57 -05:00
if (
els instanceof HTMLCollection ||
els instanceof NodeList ||
els instanceof Array
) {
return Array.prototype.forEach.call(els, fn, context);
Test forEachEls
2014-05-04 08:45:05 +02:00
}
Code cleanup (#120) * Lots of code cleanup * Cleanup parse-options tests - Rename objects for clarity and inline unneeded objects - Remove unneeded tests - Use Object.keys().length instead of a custom function - Use typeof === "object" instead of a custom function that checks the prototype tree as well, since we don't expect anything but an object literal. * Remove old switchFallback code * Remove polyfill for Function.prototype.bind * Inline small functions * Add more documentation and tests for options.currentUrlFullReload Closes #17 * Update package.json
2018-02-02 09:52:44 -05:00
// assume simple DOM element
Switch linting to ESLint and Prettier (#191) * Switch linting to ESLint and Prettier * Clean up config * Prettier fixes
2019-02-13 22:26:57 -05:00
return fn.call(context, els);
};
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 31ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API