domle 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/lib/domle.rb +29 -5
  5. metadata +27 -27
  6. metadata.gz.sig +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 60ec7d7672b54a42cfcd69d4073231ec96e3c015b2f12884c55df456654fd7b4
4
- data.tar.gz: 8f110ef215d6be5fef49c16816a012839aa446d599fd48a259cfe5472f40f62b
3
+ metadata.gz: c1603ab1131e919539aca6ca3ea4bc45088d811a09fdf623f4ce587c00998205
4
+ data.tar.gz: 9d05226c9c07646e789c4194ca77091a06cd718861ac117bf27db4f98180a4b7
5
5
  SHA512:
6
- metadata.gz: 862aa72c582891835f857b82155adc390dbb9c7f408a1d59611cac64ba4f23ab70a3a4b71d581778e2f116bad2d663d3c1aceb5585a227123c2d64165f94db2f
7
- data.tar.gz: e40002835209948ac9bbd9047d176d6d3aadb986debc7108b913afba1f4a86b0d388ea62f7ec37facc02bab5f0a67865e449679b02b30eedddfdf475b563699a
6
+ metadata.gz: 51433b3b698d31a7e40133f2155624fa1d92825d79f8b401a1cf90d7d540850022ae1e288bee39065415980685309bdb24589bf8b27e62d2cef2a087ce5f1500
7
+ data.tar.gz: 9ce9647e9fa15e1de9939fae49208a6bf7aebc11f5dad2a07b69606fd4e4a224746e528af79cc1331701a8702146739e9e8ab496b08dcb14809b387d71f2e1f9
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/domle.rb CHANGED
@@ -71,7 +71,7 @@ class Domle < Rexle
71
71
  a.concat %i(id transform)
72
72
  # DOM events
73
73
  a.concat %i(onload onmousemove onmousedown onmouseenter
74
- onmouseleave onclick onscroll)
74
+ onmouseleave onclick onscroll onkeydown onkeyup)
75
75
 
76
76
  a.each do |attribute|
77
77
 
@@ -99,6 +99,17 @@ class Domle < Rexle
99
99
  @active = v
100
100
  end
101
101
 
102
+ def classlist()
103
+
104
+ a = attributes[:class]
105
+
106
+ def a.toggle(name)
107
+ self.include?(name) ? self.delete(name) : self << name
108
+ end
109
+
110
+ return a
111
+ end
112
+
102
113
  def style()
103
114
  attributes.style(@rexle)
104
115
  end
@@ -121,6 +132,8 @@ class Domle < Rexle
121
132
 
122
133
 
123
134
  end
135
+
136
+ attr_reader :event
124
137
 
125
138
  def initialize(x='<svg/>', callback: nil, rexle: self, debug: false)
126
139
 
@@ -128,13 +141,24 @@ class Domle < Rexle
128
141
  find_add_css() if x
129
142
  @callback, @debug = callback, debug
130
143
 
144
+ @event = {
145
+ keydown: []
146
+ }
147
+
131
148
  end
132
149
 
133
- def element_by_id(id)
134
- @doc.root.element("//*[@id='#{id}']")
135
- end
136
-
150
+ def addevent_listener(event, method_name)
151
+
152
+ @event[:keydown] << method_name
153
+
154
+ end
155
+
156
+
157
+ def element_by_id(id)
158
+ @doc.root.element("//*[@id='#{id}']")
159
+ end
137
160
 
161
+
138
162
  def refresh()
139
163
  @callback.refresh if @callback
140
164
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: domle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -11,31 +11,31 @@ cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
14
- YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkwMjA5MTgyNzIyWhcN
15
- MjAwMjA5MTgyNzIyWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
- cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGK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S3dbrRugCOShy+F/mlA0zNc1k0l9AmCX2az
35
- 5W+/h8msUafjVr6ihNHTXefecVsjVhacb6l0hBYUNzXDpkhCjnNUaSxcS0e4FavI
36
- JHHC9WlNneDJrmTdGxNUWsw6
28
+ BgkqhkiG9w0BAQsFAAOCAYEATKO4gsH586vrhwVMsn8y4MNk+oNmqLaV5/uQzki6
29
+ I3jSu/1NOnHgOwZ+qj7FtGQIhlWrk3B2Yl+1DnF/YXmkppV7Ge5DLhpRRxXW2ZfA
30
+ SUc9ShIkYXrgfY1r7oL5iMSsLUp+kNA8RlRmhxhdRH8rm80nlvoYtJH/kGN9xgNZ
31
+ 9swoqkehC7nNf6RzRiFd3z7xCnNOnAqTzvIdIm0CBwhGAixGLRfOit3v3/iIyjSe
32
+ jIWH0OKqh/m8vvFCTCHFtr5gR+J3sBfJfg+Y+TH2Hi/GOkvU+SZ1uyWWAkuGxVnX
33
+ JYmxw6FYVTYOv/r2nz/sVQWRDxYYjV5LcZ1ItJS9MVdvb9vDYzQw3clEt+K5DjQU
34
+ iCUNL5rwIkLnLoAc4c6M3bTze3UExyNDNjwQjuUV6Kyl/105/90y44FgAizwS6xu
35
+ ewt0cFO7UqEB/yC8KNeXJjd19INo+w98LYjFZQEzLAg15Sz7ca5bUbr/LuYQUk4y
36
+ Lvi3w1KUp4YuUbhbhnEQXuPH
37
37
  -----END CERTIFICATE-----
38
- date: 2019-02-26 00:00:00.000000000 Z
38
+ date: 2020-05-01 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rexle
@@ -46,7 +46,7 @@ dependencies:
46
46
  version: '1.5'
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 1.5.1
49
+ version: 1.5.15
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
@@ -56,7 +56,7 @@ dependencies:
56
56
  version: '1.5'
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 1.5.1
59
+ version: 1.5.15
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: csslite
62
62
  requirement: !ruby/object:Gem::Requirement
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.0.1
126
+ rubygems_version: 3.0.3
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Domle (DOM + Rexle) is the document object model used by the Svgle gem
metadata.gz.sig CHANGED
Binary file