Skip to content

Commit 3c657a0

Browse files
authored
Merge pull request #107 from opal/staging
18th Staging
2 parents 857f88d + dba2db2 commit 3c657a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+232
-311
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
## 0.3.4
2+
* Element#children=
3+
* Support more methods on Media
4+
* Event::Custom to support non-enumerable properties
25
* DOM::Element::Form: #valid?, #request_submit, #ajax_submit
36
* Compatibility for Opal-RSpec 1.0
47

opal/browser/dom/element.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# backtick_javascript: true
2+
13
# Requires are moved to the bottom of this file.
24

35
module Browser; module DOM
@@ -367,6 +369,8 @@ def inner_dom=(node)
367369
self << node
368370
end
369371

372+
alias children= inner_dom=
373+
370374
# @!attribute inner_html
371375
# @return [String] the inner HTML of the element
372376
def inner_html

opal/browser/dom/element/attributes.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# backtick_javascript: true
2+
13
module Browser; module DOM; class Element < Node
24

35
class Attributes

opal/browser/dom/element/button.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# backtick_javascript: true
2+
13
module Browser; module DOM; class Element < Node
24

35
class Button < Element

opal/browser/dom/element/custom.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# use_strict: true
22
# helpers: truthy
3+
# backtick_javascript: true
34

45
module Browser; module DOM; class Element < Node
56

@@ -174,4 +175,4 @@ def detached_once
174175
include Mixin
175176
end
176177

177-
end; end; end
178+
end; end; end

opal/browser/dom/element/data.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# backtick_javascript: true
2+
13
module Browser; module DOM; class Element < Node
24

35
class Data

opal/browser/dom/element/editable.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# backtick_javascript: true
2+
13
module Browser; module DOM
24

35
class Element < Node

opal/browser/dom/element/form.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# backtick_javascript: true
2+
13
module Browser; module DOM; class Element < Node
24

35
class Form < Element

opal/browser/dom/element/iframe.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# backtick_javascript: true
2+
13
module Browser; module DOM; class Element < Node
24

35
class Iframe < Element

opal/browser/dom/element/image.rb

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
1+
# backtick_javascript: true
2+
13
module Browser; module DOM; class Element < Node
24

35
class Image < Element
46
def_selector "img"
57

6-
def complete?
7-
`#@native.complete`
8-
end
9-
10-
def cross?
11-
`#@native.crossOrigin`
12-
end
13-
14-
def height
15-
`#@native.naturalHeight`
16-
end
17-
18-
def width
19-
`#@native.naturalWidth`
20-
end
8+
alias_native :complete?, :complete
9+
alias_native :cross?, :crossOrigin
10+
alias_native :height, :naturalHeight
11+
alias_native :width, :naturalWidth
2112
end
2213

2314
Img = Image

0 commit comments

Comments
 (0)