From 28b5810a86a19032855cce10492d4c1436a5021e Mon Sep 17 00:00:00 2001 From: Yash Jaiswal Date: Tue, 6 Jan 2026 16:54:54 +0530 Subject: [PATCH 1/2] fix: add CSP nonce support for dynamically created style tags --- lib/DraggableCore.js | 11 ++++++++++- lib/utils/domFns.js | 6 +++++- typings/index.d.ts | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/DraggableCore.js b/lib/DraggableCore.js index 505be625..55a15443 100644 --- a/lib/DraggableCore.js +++ b/lib/DraggableCore.js @@ -50,6 +50,7 @@ export type DraggableCoreDefaultProps = { onStop: DraggableEventHandler, onMouseDown: (e: MouseEvent) => void, scale: number, + nonce: ?string, }; export type DraggableCoreProps = { @@ -60,6 +61,7 @@ export type DraggableCoreProps = { grid: [number, number], handle: string, nodeRef?: ?React.ElementRef, + nonce?: ?string, }; // @@ -213,6 +215,12 @@ export default class DraggableCore extends React.Component { */ scale: PropTypes.number, + /** + * `nonce`, if set, will be added to the dynamically created