opal-jquery 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -3,4 +3,4 @@ source :rubygems
3
3
  gem 'rake'
4
4
 
5
5
  gem 'opal'
6
- gem 'opal-spec'
6
+ gem 'opal-spec'
data/Rakefile CHANGED
@@ -6,4 +6,4 @@ Opal::RakeTask.new do |t|
6
6
  t.dependencies = ['opal-spec']
7
7
  end
8
8
 
9
- task :default => [:opal, :'opal:test']
9
+ task :default => [:opal, :'opal:test']
@@ -391,6 +391,7 @@ class Element < `jQuery`
391
391
 
392
392
  alias succ next
393
393
 
394
+ alias_native :text, :text
394
395
  alias_native :text=, :text
395
396
 
396
397
  alias_native :toggle_class, :toggleClass
@@ -407,5 +408,4 @@ class Element < `jQuery`
407
408
  alias_native :hide, :hide
408
409
  alias_native :show, :show
409
410
  alias_native :toggle, :toggle
410
-
411
411
  end
@@ -1,4 +1,9 @@
1
+ # Wraps native jQuery event objects.
1
2
  class Event < `$.Event`
3
+ def [](name)
4
+ `#{self}[name]`
5
+ end
6
+
2
7
  def current_target
3
8
  `$(#{self}.currentTarget)`
4
9
  end
@@ -19,14 +24,10 @@ class Event < `$.Event`
19
24
 
20
25
  alias_native :stop_propagation, :stopPropagation
21
26
 
22
- def target
23
- %x{
24
- if (#{self}._opalTarget) {
25
- return #{self}._opalTarget;
26
- }
27
+ alias_native :stop_immediate_propagation, :stopImmediatePropagation
27
28
 
28
- return #{self}._opalTarget = $(#{self}.target);
29
- }
29
+ def target
30
+ `$(#{self}.target)`
30
31
  end
31
32
 
32
33
  def type
@@ -37,4 +38,3 @@ class Event < `$.Event`
37
38
  `#{self}.which`
38
39
  end
39
40
  end
40
-
data/opal-jquery.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'opal-jquery'
5
- s.version = '0.0.2'
5
+ s.version = '0.0.3'
6
6
  s.author = 'Adam Beynon'
7
7
  s.email = 'adam.beynon@gmail.com'
8
8
  s.homepage = 'http://opalrb.org'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opal-jquery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-10 00:00:00.000000000 Z
12
+ date: 2013-01-17 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Opal DOM library for jquery
15
15
  email: adam.beynon@gmail.com
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 1.8.24
78
+ rubygems_version: 1.8.11
79
79
  signing_key:
80
80
  specification_version: 3
81
81
  summary: Opal access to jquery