@basthon/kernel-base 0.41.5 → 0.41.8

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/lib/kernel.d.ts CHANGED
@@ -71,10 +71,6 @@ export declare class KernelBase {
71
71
  * Dynamically load a script asynchronously.
72
72
  */
73
73
  static loadScript(url: string): Promise<any>;
74
- /**
75
- * Wraper around XMLHttpRequest.
76
- */
77
- static xhr(params: any): Promise<unknown>;
78
74
  /**
79
75
  * Wrapper around document.dispatchEvent.
80
76
  * It adds the 'basthon.' prefix to each event name and
package/lib/kernel.js CHANGED
@@ -162,40 +162,6 @@ export class KernelBase {
162
162
  });
163
163
  }
164
164
  ;
165
- /**
166
- * Wraper around XMLHttpRequest.
167
- */
168
- static xhr(params) {
169
- const xhr = new XMLHttpRequest();
170
- xhr.open(params.method, params.url, true);
171
- if (params.responseType != null)
172
- xhr.responseType = params.responseType;
173
- const promise = new Promise(function (resolve, reject) {
174
- xhr.onload = function () {
175
- if (xhr.status >= 200 && xhr.status < 300) {
176
- resolve(xhr.response);
177
- }
178
- else {
179
- reject(xhr);
180
- }
181
- };
182
- xhr.onerror = function () { reject(xhr); };
183
- });
184
- // headers
185
- if (params.headers) {
186
- Object.keys(params.headers).forEach(function (key) {
187
- xhr.setRequestHeader(key, params.headers[key]);
188
- });
189
- }
190
- // data
191
- let data = params.data;
192
- if (data && typeof data === 'object') {
193
- data = JSON.stringify(data);
194
- }
195
- xhr.send(data);
196
- return promise;
197
- }
198
- ;
199
165
  /**
200
166
  * Wrapper around document.dispatchEvent.
201
167
  * It adds the 'basthon.' prefix to each event name and
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.41.5";
1
+ export declare const VERSION = "0.41.8";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.41.5";
1
+ export const VERSION = "0.41.8";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basthon/kernel-base",
3
- "version": "0.41.5",
3
+ "version": "0.41.8",
4
4
  "description": "Basthon - Base Kernel",
5
5
  "homepage": "https://basthon.fr",
6
6
  "bugs": {
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "077946ce25c4cb4f813829b981e2c25e492b5166"
39
+ "gitHead": "aed1dc4c7399ea2043ff5290e99ba48f81fdf8bb"
40
40
  }