Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasticsoul committed May 20, 2024
1 parent 7b3f10a commit 83e7673
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
10 changes: 6 additions & 4 deletions packages/hel-micro-mini/src/browser/xhr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ interface Response<T extends any = any> {
export function getXHRIns() {
let xhr;
const { XMLHttpRequest, ActiveXObject } = getGlobalThis();
if (XMLHttpRequest) { // 标准浏览器
if (XMLHttpRequest) {
// 标准浏览器
xhr = new XMLHttpRequest();
} else if (ActiveXObject) { // 旧版IE
xhr = new ActiveXObject("Microsoft.XMLHTTP");
} else if (ActiveXObject) {
// 旧版IE
xhr = new ActiveXObject('Microsoft.XMLHTTP');
}
return xhr;
}
Expand Down Expand Up @@ -85,7 +87,7 @@ class XHR {
req.onerror = (e) => wrapErrResult(e);
req.onabort = (e) => wrapErrResult(e);
req.ontimeout = (e) => wrapErrResult(e);
req.onprogress = () => { };
req.onprogress = () => {};
}

async request<T extends any = any>(url: string, method?: string): Promise<Response<T>> {
Expand Down
2 changes: 1 addition & 1 deletion packages/hel-micro-mini/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import './core/microDebug';
import './core/microShared';
export { preFetchLib } from './prefetch';
export { getUserEventBus as eventBus } from './core/cache';
export { preFetchLib } from './prefetch';
1 change: 0 additions & 1 deletion packages/hel-micro-mini/src/prefetch/loadApp.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export default async function (appName, options) {
// get hel meta

}
1 change: 0 additions & 1 deletion packages/hel-micro-mini/src/prefetch/waitAppEmit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { getHelEventBus } from '../core/cache';


export default async function (appName, options, loadAssetsStarter?) {
const eventBus = getHelEventBus();
// eventBus.on
Expand Down

0 comments on commit 83e7673

Please sign in to comment.