Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Created January 31, 2019 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomhodgins/0ee1517d1cf943eb0c29bbf41b001d83 to your computer and use it in GitHub Desktop.
Save tomhodgins/0ee1517d1cf943eb0c29bbf41b001d83 to your computer and use it in GitHub Desktop.
Add every(), filter(), find(), findIndex(), forEach(), includes(), indexOf(), lastIndexOf(), map(), and some() to StyleSheetList objects and CSSRuleList objects
[
'every',
'filter',
'find',
'findIndex',
'forEach',
'includes',
'indexOf',
'lastIndexOf',
'map',
'some'
].forEach(method =>
StyleSheetList.prototype[method]
= CSSRuleList.prototype[method]
= Array.prototype[method]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment