From eeaf9c829e8607d3711d72506c733245d29c10a0 Mon Sep 17 00:00:00 2001 From: nod_ Date: Sat, 22 Jun 2024 21:44:08 +0200 Subject: [PATCH] Issue #3440676 by Utkarsh_33, smustgrave, catch, bnjmnm, nod_: Trigger a JavaScript deprecation error for dialogClass in forked dialog.js --- core/misc/dialog/dialog.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/misc/dialog/dialog.js b/core/misc/dialog/dialog.js index 76a0deea25b..dff0faf22a8 100644 --- a/core/misc/dialog/dialog.js +++ b/core/misc/dialog/dialog.js @@ -78,6 +78,13 @@ class DrupalDialogEvent extends Event { function openDialog(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. const event = new DrupalDialogEvent('beforecreate', dialog, settings); domElement.dispatchEvent(event);