I am trying to make a match of the selector and the element to extract relevant css, it works well except for certain types of selectors implemented because of angular on certain sites
var ruleCheck='[ng:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate)';
//the issue is with selectors as [ng:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak] throws an error of invalid selector
var ruleCheck1='.ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate)';
//the above ruleCheck1 works fine
var a= document.createElement("p");
p.className="test";
a.matches(ruleCheck1);// works fine
a.matches(ruleCheck); // invalid selector error
Is there a workaround for this problem