Your Search Results


    The StyleSheetList interface represents a list of StyleSheet.

    It is an array-like object but can't be iterated over using Array methods. However It can be iterated over in a standard for loop over its indices, or converted to an Array.


    // Get all CSS rules for the current document using Array methods
    var allCSS = []
                         .reduce(function (prev, styleSheet) {
            if (styleSheet.cssRules) {
                return prev +
                            .reduce(function (prev, cssRule) {
                        return prev + cssRule.cssText;
            } else {
                return prev;

    Document Tags and Contributors

    Contributors to this page: Sheppy, teoli, ethertank, Zig, kscarfone, Reachmeatshivam, KthProg
    Last updated by: teoli,