isomorfeus-preact 10.6.44 → 10.6.45
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isomorfeus/preact_view_helper.rb +1 -1
- data/lib/isomorfeus/ssr.rb +9 -0
- data/lib/isomorfeus/top_level_ssr.rb +6 -0
- data/lib/preact/version.rb +1 -1
- data/lib/preact.rb +1 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3363983634e71069a60fa277a03d0394993690dcf7cab706fb8a28fc22367072
|
4
|
+
data.tar.gz: d8a9855c74eb31e3de87dba1c5bd5c5362a6f2cda93d7bbcb42e8b1ceec6d7ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a2e5544a14afdb95e1ca54a679285fffffacb9d25b8c8ab7971acd70d71221fde8b4c28733ee0aa4ca8900226653db6273de1d1d14552214a7c8458e6f51b88
|
7
|
+
data.tar.gz: 2cf4331a001fce697899ebaacb409a50a8d1873efad53f52ebf4612cac50f02f8616eac13b9ab62518417f78503c7077750f8fc5a361ff53e3c4d36a865f4bce
|
@@ -186,7 +186,7 @@ module Isomorfeus
|
|
186
186
|
ctx.add_script(key: :still_busy, source: 'Opal.Isomorfeus.SSR.still_busy()')
|
187
187
|
ctx.add_script(key: :store_busy, source: 'Opal.Isomorfeus.SSR.store_busy()')
|
188
188
|
ctx.add_script(key: :transport_busy, source: 'global.Opal.Isomorfeus.Transport["$busy?"]()')
|
189
|
-
ctx.add_script(key: :transport_disconnect, source: 'global.Opal.Isomorfeus.
|
189
|
+
ctx.add_script(key: :transport_disconnect, source: 'global.Opal.Isomorfeus.SSR.$disconnect_transport()')
|
190
190
|
end
|
191
191
|
end
|
192
192
|
|
data/lib/isomorfeus/ssr.rb
CHANGED
@@ -81,5 +81,14 @@ module Isomorfeus
|
|
81
81
|
return (nfp == global.Opal.nil) ? false : nfp;
|
82
82
|
}
|
83
83
|
}
|
84
|
+
|
85
|
+
def self.disconnect_transport
|
86
|
+
Isomorfeus::Transport::RequestAgent.agents.each do |agent_id, agent|
|
87
|
+
agent.promise.reject() unless agent.promise.realized?
|
88
|
+
Isomorfeus::Transport::RequestAgent.del!(agent_id)
|
89
|
+
end
|
90
|
+
Isomorfeus::Transport.instance_variable_set(:@requests_in_progress, { requests: {}, agent_ids: {} })
|
91
|
+
Isomorfeus::Transport.disconnect
|
92
|
+
end
|
84
93
|
end
|
85
94
|
end
|
data/lib/preact/version.rb
CHANGED
data/lib/preact.rb
CHANGED
@@ -294,11 +294,7 @@ module Preact
|
|
294
294
|
end
|
295
295
|
end
|
296
296
|
|
297
|
-
|
298
|
-
def self.render_to_string(native_preact_element)
|
299
|
-
`Opal.global.Preact.renderToString(native_preact_element)`
|
300
|
-
end
|
301
|
-
end
|
297
|
+
# render_to_string is in top_level_ssr.rb
|
302
298
|
|
303
299
|
def self.unmount_component_at_node(element_or_query)
|
304
300
|
if `(typeof element_or_query === 'string')` || (`(typeof element_or_query.$class === 'function')` && element_or_query.class == String)
|