Issue #3440676 by Utkarsh_33, smustgrave, catch, bnjmnm, nod_: Trigger a JavaScript deprecation error for dialogClass in forked dialog.js
parent
1a487f3b7c
commit
eeaf9c829e
|
@ -78,6 +78,13 @@ class DrupalDialogEvent extends Event {
|
||||||
|
|
||||||
function openDialog(settings) {
|
function openDialog(settings) {
|
||||||
settings = $.extend({}, drupalSettings.dialog, options, settings);
|
settings = $.extend({}, drupalSettings.dialog, options, settings);
|
||||||
|
if (settings.dialogClass) {
|
||||||
|
Drupal.deprecationError({
|
||||||
|
message:
|
||||||
|
'dialogClass is deprecated in drupal:10.4.x and will be removed from drupal:12.0.0.',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Trigger a global event to allow scripts to bind events to the dialog.
|
// Trigger a global event to allow scripts to bind events to the dialog.
|
||||||
const event = new DrupalDialogEvent('beforecreate', dialog, settings);
|
const event = new DrupalDialogEvent('beforecreate', dialog, settings);
|
||||||
domElement.dispatchEvent(event);
|
domElement.dispatchEvent(event);
|
||||||
|
|
Loading…
Reference in New Issue