mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-28 02:58:18 +08:00
fix dialog in jsdom
This commit is contained in:
@@ -19,5 +19,19 @@ export default class CustomJSDOMEnvironment extends JSDOMEnvironment {
|
||||
|
||||
// FIXME https://github.com/jsdom/jsdom/issues/3363
|
||||
this.global.structuredClone = structuredClone;
|
||||
|
||||
if (!this.global.HTMLDialogElement.prototype.showModal) {
|
||||
this.global.HTMLDialogElement.prototype.showModal = function () {
|
||||
this.open = true;
|
||||
};
|
||||
}
|
||||
|
||||
// FIXME https://github.com/jsdom/jsdom/issues/3294
|
||||
if (!this.global.HTMLDialogElement.prototype.close) {
|
||||
this.global.HTMLDialogElement.prototype.close = function (returnValue) {
|
||||
this.open = false;
|
||||
this.returnValue = returnValue;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user