回答編集履歴
1
不要な宣言があったので修正
test
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
```JavaScript
|
2
2
|
|
3
3
|
function addStyleRule(selector, styleRule, style) {
|
4
|
-
|
5
|
-
var sheet, i;
|
6
4
|
|
7
5
|
if (!style) {
|
8
6
|
|
@@ -14,7 +12,7 @@
|
|
14
12
|
|
15
13
|
|
16
14
|
|
17
|
-
sheet = style.sheet;
|
15
|
+
var sheet = style.sheet;
|
18
16
|
|
19
17
|
sheet.insertRule(selector + '{' + styleRule + '}', sheet.cssRules.length);
|
20
18
|
|