source: imaps-frontend/node_modules/nano-css/addon/vcssom/removeRule.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 386 bytes
Line 
1function removeRule (rule) {
2 var maxIndex = rule.index;
3 var sh = rule.parentStyleSheet;
4 var rules = sh.cssRules || sh.rules;
5 maxIndex = Math.max(maxIndex, rules.length - 1);
6 while (maxIndex >= 0) {
7 if (rules[maxIndex] === rule) {
8 sh.deleteRule(maxIndex);
9 break;
10 }
11 maxIndex--;
12 }
13}
14
15exports.removeRule = removeRule;
Note: See TracBrowser for help on using the repository browser.