opal-virtual-dom 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/opal-virtual-dom.gemspec +1 -1
- data/opal/virtual_dom/dom.rb +19 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3b99baf852b0d8f5e170531a65ac3cc2b100855
|
4
|
+
data.tar.gz: 9b7296c8436cc57c33d1a6c60982f2544228d4ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f26ad07b31759990f20dbafbf12659f8003b63bd02c43bd367386cc93698b30675fb9df781e72bd1fcf202c2b942e98962f2b622a4e6c2f60adf8fec9570b7cd
|
7
|
+
data.tar.gz: c066ad3a5fc5b336aa6790461ebac81fa6e58b97c3b4ffc77a6d355725fa83ef50f205fcbf018525bbb1f5b4a14c0a18dd20d0daba5dae19c82486625902706b
|
data/opal-virtual-dom.gemspec
CHANGED
data/opal/virtual_dom/dom.rb
CHANGED
@@ -32,13 +32,31 @@ module VirtualDOM
|
|
32
32
|
case k
|
33
33
|
when 'class'
|
34
34
|
params['className'] = params.delete('class')
|
35
|
+
when 'data'
|
36
|
+
params['dataset'] = params.delete('data')
|
37
|
+
when 'default'
|
38
|
+
params['defaultValue'] = params.delete('default')
|
35
39
|
when /^on/
|
36
|
-
params[k] =
|
40
|
+
params[k] = event_callback(v)
|
37
41
|
end
|
38
42
|
end
|
39
43
|
params
|
40
44
|
end
|
41
45
|
|
46
|
+
if defined?(Browser::Event)
|
47
|
+
def event_callback(v)
|
48
|
+
proc do |e|
|
49
|
+
v.call(Browser::Event.new(e))
|
50
|
+
end
|
51
|
+
end
|
52
|
+
else
|
53
|
+
def event_callback(v)
|
54
|
+
proc do |e|
|
55
|
+
v.call(Native(e))
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
42
60
|
# for backwards compatibility, you can return string
|
43
61
|
def text(string)
|
44
62
|
@__virtual_nodes__ << string.to_s
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opal-virtual-dom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michał Kalbarczyk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|