File "getMatchedCSSRules.js"
Full Path: /home/pumpbmko/public_html/wp-content/plugins/x2kqsdn9/public/vendors/split/packages/split-grid/src/getMatchedCSSRules.js
File size: 629 bytes
MIME-type: text/plain
Charset: utf-8
export default el =>
[]
.concat(
...Array.from(el.ownerDocument.styleSheets).map(s => {
let rules = []
try {
rules = Array.from(s.cssRules || [])
} catch (e) {
// Ignore results on security error
}
return rules
}),
)
.filter(r => {
let matches = false
try {
matches = el.matches(r.selectorText)
} catch (e) {
// Ignore matching erros
}
return matches
})