Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal-browser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 04f1a93e978a
Choose a base ref
...
head repository: opal/opal-browser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7d35222bfa09
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jan 26, 2014

  1. spec: remove allowed failures

    meh committed Jan 26, 2014
    Copy the full SHA
    b55be31 View commit details
  2. dom/event: fix #target

    meh committed Jan 26, 2014
    Copy the full SHA
    7d35222 View commit details
Showing with 3 additions and 28 deletions.
  1. +0 −8 .travis.yml
  2. +3 −13 opal/browser/dom/event.rb
  3. +0 −7 opal/browser/support.rb
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -38,14 +38,6 @@ env:
matrix:
fast_finish: true

allow_failures:
- env: SELENIUM_BROWSER=chrome SELENIUM_VERSION=31
- env: SELENIUM_BROWSER=chrome SELENIUM_VERSION=30

- env: SELENIUM_BROWSER=ie SELENIUM_VERSION=6
- env: SELENIUM_BROWSER=ie SELENIUM_VERSION=7
- env: SELENIUM_BROWSER=ie SELENIUM_VERSION=8

before_install:
- gem update bundler
- bundle --version
16 changes: 3 additions & 13 deletions opal/browser/dom/event.rb
Original file line number Diff line number Diff line change
@@ -208,24 +208,14 @@ def on
return @on if @on

if @callback
Target.convert(@callback.target)
@callback.target
else
Target.convert(`#@native.currentTarget`)
end
end

if Browser.supports? 'Event.target'
def target
Target.convert(`#@native.target`)
end
elsif Browser.supports? 'Event.srcElement'
def target
Target.convert(`#@native.srcElement`)
end
else
def target
raise NotImplementedError, 'event target unsupported'
end
def target
Target.convert(`#@native.srcElement || #@native.target`)
end

def arguments
7 changes: 0 additions & 7 deletions opal/browser/support.rb
Original file line number Diff line number Diff line change
@@ -156,13 +156,6 @@ def self.supports?(feature)
when 'Event.fire'
defined?(`document.fireEvent`)

# TODO: implement this
when 'Event.target'
supports? 'Event.constructor'

when 'Event.srcElement'
supports? 'Event.createObject'

when /^Event\.([A-Z].*?)$/
`(#{$1} + "Event") in window`