Sha256: 1ddb2a0e6e3ced13948259858bb07e606f9f23014336e364e68629c859c0f0c9
Contents?: true
Size: 794 Bytes
Versions: 15
Compression:
Stored size: 794 Bytes
Contents
export class VDialog { constructor(options, params, event) { this.dialogId = options.target; this.params = params; this.event = event; } call(results) { var dialog = document.querySelector('#' + this.dialogId); if(dialog) { if (!dialog.showModal) { dialogPolyfill.registerDialog(dialog); } dialog.showModal(); }else { console.error("Unable to find dialog with id: "+this.dialogId+". Usually this means you forgot to attach it to the currently rendered page."); } var promiseObj = new Promise(function (resolve) { results.push({action:'dialog', statusCode: 200}); resolve(results); }); return promiseObj; } }
Version data entries
15 entries across 15 versions & 1 rubygems