isomorfeus-preact 10.6.23 → 10.6.24

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8b133ab120af42dff909afe3fd478174cd0ff2414a73b8d1281cfdde3e5d333
4
- data.tar.gz: 681651aa16c14f38d2e0fa45a5fff880a4513bc5bff3f59acb88fadf0fc3279d
3
+ metadata.gz: 6bf4eaa022b76cf456aff65c04257f0f7d8877ac285c9b0dfcece7a4c95d6f93
4
+ data.tar.gz: c8d50c5a3a92e2ebad7a215746f0fd0aa21f910585187a645fffb6f5bfc4e9fd
5
5
  SHA512:
6
- metadata.gz: e881c1b2d966629ff7ce355387ebaa43f05d9e89f73a513e09f0da1721143ec4370141f7c1679c50363794be974632f13ff92a1377883094459329ad9873f9e1
7
- data.tar.gz: 6857773386b43ddb122e7045d2cfc07fa06375b59597e7e51d6860ba26e841ececee6b7ae44b8713c3a72eff35678071b7d03c4bae38fee73d7475b90b3a2e25
6
+ metadata.gz: 85cc46da828b1aee16afd1c5f68e251514eabdfc168f6537ce65c084edecf2d43dd96ede48e30fa88ee694cb066e9e5795c84966ac2cea940e493a652133f286
7
+ data.tar.gz: 05a90b9e5fe7165008558dcb226040af5c839bf6a703c80bd73c4ad09212222c411906eb94e1539b1cc4f0c2f153101f5a4b3b96797cf6c35129d0d240edfe5c
@@ -26,12 +26,22 @@ module Browser
26
26
  %x{
27
27
  let value = #@native[#{property_name}];
28
28
  let type = typeof(value);
29
- if (type === 'function') {
30
- return value.apply(#@native, args);
31
- } else if (value === null || type === 'undefined' || (type === 'number' && isNaN(value))) {
32
- return nil;
33
- }
34
- return value;
29
+ try {
30
+ if (type === 'function') {
31
+ return value.apply(#@native, args);
32
+ } else if (type === 'object' && (value instanceof HTMLCollection)) {
33
+ let a = [];
34
+ for(let i=0; i<value.length; i++) {
35
+ a[i] = #{Browser::Element.new(`value.item(i)`)};
36
+ }
37
+ value = a;
38
+ } else if (type === 'object' && (value instanceof HTMLElement)) {
39
+ value = #{Browser::Element.new(value)};
40
+ } else if (value === null || type === 'undefined' || (type === 'number' && isNaN(value))) {
41
+ return nil;
42
+ }
43
+ return value;
44
+ } catch { return value; }
35
45
  }
36
46
  end
37
47
  end
@@ -1,3 +1,3 @@
1
1
  module Preact
2
- VERSION = '10.6.23'
2
+ VERSION = '10.6.24'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-preact
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.6.23
4
+ version: 10.6.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-31 00:00:00.000000000 Z
11
+ date: 2022-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.14.7
89
+ version: 0.14.8
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.14.7
96
+ version: 0.14.8
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: isomorfeus-redux
99
99
  requirement: !ruby/object:Gem::Requirement