main
Last change
on this file since d565449 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
|
Rev | Line | |
---|
[d565449] | 1 | function 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 |
|
---|
| 15 | exports.removeRule = removeRule;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.