@webqit/webflo 0.11.19 → 0.11.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -112,8 +112,8 @@ export default class Runtime {
|
|
|
112
112
|
// Capture all form-submit
|
|
113
113
|
// and fire to this router.
|
|
114
114
|
window.addEventListener('submit', e => {
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
const form = e.target.closest('form'), submitter = e.submitter;
|
|
116
|
+
const submitParams = [ 'action', 'enctype', 'method', 'noValidate', 'target' ].reduce((params, prop) => {
|
|
117
117
|
params[prop] = submitter && submitter.hasAttribute(`form${prop.toLowerCase()}`) ? submitter[`form${_toTitle(prop)}`] : form[prop];
|
|
118
118
|
return params;
|
|
119
119
|
}, {});
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { _any } from '@webqit/util/arr/index.js';
|
|
6
6
|
import { urlPattern } from '../../util.js';
|
|
7
|
-
import Workport from './Workport.js';
|
|
8
7
|
import { HttpEvent, Request, Response, Observer } from '../Runtime.js';
|
|
8
|
+
import Workport from './Workport.js';
|
|
9
9
|
export {
|
|
10
10
|
URL,
|
|
11
11
|
FormData,
|
|
@@ -83,6 +83,14 @@ export default class Worker {
|
|
|
83
83
|
}) );
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
+
// ---------------
|
|
87
|
+
Observer.set(this, 'location', {});
|
|
88
|
+
Observer.set(this, 'network', {});
|
|
89
|
+
// ---------------
|
|
90
|
+
Observer.observe(this.network, es => {
|
|
91
|
+
//console.log('//////////', ...es.map(e => `${e.name}: ${e.value}`))
|
|
92
|
+
});
|
|
93
|
+
|
|
86
94
|
// -------------
|
|
87
95
|
// ONFETCH
|
|
88
96
|
self.addEventListener('fetch', event => {
|
|
@@ -126,22 +134,10 @@ export default class Worker {
|
|
|
126
134
|
}
|
|
127
135
|
}
|
|
128
136
|
});
|
|
129
|
-
workport.notifications.listen(async evt => {
|
|
130
|
-
let client = this.clients.get('*');
|
|
131
|
-
client.alert && await client.alert(evt);
|
|
132
|
-
});
|
|
133
137
|
workport.push.listen(async evt => {
|
|
134
138
|
let client = this.clients.get('*');
|
|
135
139
|
client.alert && await client.alert(evt);
|
|
136
140
|
});
|
|
137
|
-
|
|
138
|
-
// ---------------
|
|
139
|
-
Observer.set(this, 'location', {});
|
|
140
|
-
Observer.set(this, 'network', {});
|
|
141
|
-
// ---------------
|
|
142
|
-
Observer.observe(this.network, es => {
|
|
143
|
-
//console.log('//////////', ...es.map(e => `${e.name}: ${e.value}`))
|
|
144
|
-
});
|
|
145
141
|
|
|
146
142
|
}
|
|
147
143
|
|