mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
Formatting
This commit is contained in:
parent
77fe988169
commit
b22d1562a7
@ -29,7 +29,7 @@
|
||||
|
||||
declare function CodeMirror (el: Element, config: any): void;
|
||||
|
||||
function loadScript(url: string): Promise<void> {
|
||||
function loadScript (url: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const script = document.createElement('script');
|
||||
script.src = url;
|
||||
@ -39,7 +39,7 @@ function loadScript(url: string): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
function loadCss(url: string): Promise<void> {
|
||||
function loadCss (url: string): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const link = document.createElement('link');
|
||||
link.href = url;
|
||||
@ -82,7 +82,7 @@ body { margin: 0px; }
|
||||
this.load();
|
||||
}
|
||||
|
||||
private async load() {
|
||||
private async load () {
|
||||
await Promise.all([loadScript("https://www.unpkg.com/codemirror@5.51.0/lib/codemirror.js"), loadCss("https://www.unpkg.com/codemirror@5.51.0/lib/codemirror.css")]);
|
||||
this.render(this.parent);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user