From a08b0f8f80ec1ce994dd71a3fde20fb85fdb2541 Mon Sep 17 00:00:00 2001 From: Ghislain B Date: Fri, 27 Oct 2023 11:05:57 -0400 Subject: [PATCH 1/3] fix: dynamically create CSS rules via JS instead of innerHTML (#883) * fix: dynamically create CSS rules via JS instead of innerHTML - potentially fixes #878, not sure * chore: apply nonce property on dynamic style --- src/slick.grid.ts | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/src/slick.grid.ts b/src/slick.grid.ts index 833c61e0..fd0727d9 100644 --- a/src/slick.grid.ts +++ b/src/slick.grid.ts @@ -350,7 +350,7 @@ export class SlickGrid = Column, O e protected _topPanels!: HTMLDivElement[]; protected _viewport!: HTMLDivElement[]; protected _canvas!: HTMLDivElement[]; - protected _style: any; + protected _style?: HTMLStyleElement; protected _boundAncestors: HTMLElement[] = []; protected stylesheet?: { cssRules: Array<{ selectorText: string; }>; rules: Array<{ selectorText: string; }>; } | null; protected columnCssRulesL?: Array<{ selectorText: string; }>; @@ -2299,33 +2299,28 @@ export class SlickGrid = Column, O e } protected createCssRules() { - const template = Utils.createDomElement('template', { innerHTML: '