fix(core): update
This commit is contained in:
parent
6c0c1e165f
commit
96a88112dc
@ -146,6 +146,21 @@ export class DomTools {
|
|||||||
this.elements.headElement.appendChild(styleElement);
|
this.elements.headElement.appendChild(styleElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* allows to set global styles
|
||||||
|
* @param stylesText the css text you want to set
|
||||||
|
*/
|
||||||
|
public async setExternalScript(scriptLinkArg: string) {
|
||||||
|
await this.domReady.promise;
|
||||||
|
const done = plugins.smartpromise.defer();
|
||||||
|
const script = document.createElement('script')
|
||||||
|
script.src = scriptLinkArg;
|
||||||
|
script.addEventListener('load', function() {
|
||||||
|
done.resolve();
|
||||||
|
});
|
||||||
|
await done.promise;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* allows setting external css files
|
* allows setting external css files
|
||||||
* @param cssLinkArg a url to an external stylesheet
|
* @param cssLinkArg a url to an external stylesheet
|
||||||
|
@ -174,10 +174,10 @@ export class Keyboard {
|
|||||||
this.pressedKeys.delete(event.keyCode);
|
this.pressedKeys.delete(event.keyCode);
|
||||||
};
|
};
|
||||||
|
|
||||||
private areAllKeysPressed(combo: number[]) {
|
private areAllKeysPressed(keysArg: Key[]) {
|
||||||
let result = true;
|
let result = true;
|
||||||
|
|
||||||
combo.forEach((key) => {
|
keysArg.forEach((key) => {
|
||||||
if (!this.pressedKeys.has(key)) {
|
if (!this.pressedKeys.has(key)) {
|
||||||
result = false;
|
result = false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user