File tree 2 files changed +7
-7
lines changed
2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
module Browser ; module DOM ; class Element < Node
2
2
3
3
class Attributes
4
- @@normalize = { }
4
+ @@normalize = `{}`
Has conversations. Original line has conversations. 5
5
6
6
if Browser . supports? 'Element.className'
7
- @@normalize [ : class] = : className
7
+ `# @@normalize [' class' ] = ' className'`
8
8
end
9
9
10
10
if Browser . supports? 'Element.htmlFor'
11
- @@normalize [ : for] = : htmlFor
11
+ `# @@normalize [' for' ] = ' htmlFor'`
12
12
end
13
13
14
14
attr_reader :namespace
@@ -20,7 +20,7 @@ def initialize(element, options)
20
20
end
21
21
22
22
def []( name , options = { } )
23
- name = @@normalize [ name ] || name
23
+ name = `# @@normalize [name] || name`
24
24
25
25
if namespace = options [ :namespace ] || @namespace
26
26
`#@native .getAttributeNS(#{ namespace . to_s } , #{ name . to_s } ) || nil`
@@ -30,7 +30,7 @@ def [](name, options = {})
30
30
end
31
31
32
32
def []=( name , value , options = { } )
33
- name = @@normalize [ name ] || name
33
+ name = `# @@normalize [name] || name`
34
34
35
35
if namespace = options [ :namespace ] || @namespace
36
36
`#@native .setAttributeNS(#{ namespace . to_s } , #{ name . to_s } , #{ value } )`
Original file line number Diff line number Diff line change @@ -122,15 +122,15 @@ def self.supports?(feature)
122
122
123
123
when 'Element.for'
124
124
%x{
125
- var div = document.createElement("div ");
125
+ var div = document.createElement("label ");
126
126
div.setAttribute('for', 'x');
127
127
128
128
return div.htmlFor === 'x';
129
129
}
130
130
131
131
when 'Element.htmlFor'
132
132
%x{
133
- var div = document.createElement("div ");
133
+ var div = document.createElement("label ");
134
134
div.setAttribute('htmlFor', 'x');
135
135
136
136
return div.htmlFor === 'x';
You can’t perform that action at this time.