MCPcopy
hub / github.com/IanLunn/Sequence / addFeatureSupportClasses

Function addFeatureSupportClasses

src/sequence.js:649–664  ·  view source on GitHub ↗

* Add classes to the Sequence container that allow for styling based on * feature support. * * @param {HTMLObject} $el - The element to add the classes to * @param {Object} Modernizr - Sequence's instance of Modernizr * @api private

($el, Modernizr)

Source from the content-addressed store, hash-verified

647 * @api private
648 */
649 function addFeatureSupportClasses($el, Modernizr) {
650
651 // TODO: Add support for all features used by Sequence and only manipulate
652 // the DOM once. Currently this function just adds a class for the touch
653 // feature. Probably best just to copy how Modernizr does it to implement
654 // full list of features
655
656 var prefix = "seq-",
657 support = "no-touch";
658
659 if (Modernizr.touch === true) {
660 support = "touch";
661 }
662
663 addClass($el, prefix + support);
664 }
665
666 /* --- PUBLIC PROPERTIES/METHODS --- */
667

Callers 1

defineSequenceFunction · 0.70

Calls 1

addClassFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…