@syncfusion/ej2-base 33.1.44 → 33.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3011,6 +3011,9 @@ function executeScript(ele) {
3011
3011
  * @private
3012
3012
  */
3013
3013
  function detach(element) {
3014
+ if (isNullOrUndefined(element)) {
3015
+ return;
3016
+ }
3014
3017
  const parentNode = element.parentNode;
3015
3018
  if (parentNode) {
3016
3019
  return parentNode.removeChild(element);
@@ -3024,9 +3027,16 @@ function detach(element) {
3024
3027
  * @private
3025
3028
  */
3026
3029
  function remove(element) {
3030
+ if (isNullOrUndefined(element)) {
3031
+ return;
3032
+ }
3033
+ if (element.nodeType === Node.ELEMENT_NODE) {
3034
+ EventHandler.clearEvents(element);
3035
+ }
3027
3036
  const parentNode = element.parentNode;
3028
- EventHandler.clearEvents(element);
3029
- parentNode.removeChild(element);
3037
+ if (parentNode) {
3038
+ parentNode.removeChild(element);
3039
+ }
3030
3040
  }
3031
3041
  /**
3032
3042
  * The function helps to set multiple attributes to an element
@@ -3143,14 +3153,17 @@ function closest(element, selector) {
3143
3153
  * @private
3144
3154
  */
3145
3155
  function siblings(element) {
3146
- const siblings = [];
3156
+ const result = [];
3157
+ if (isNullOrUndefined(element) || !element.parentNode) {
3158
+ return result;
3159
+ }
3147
3160
  const childNodes = Array.prototype.slice.call(element.parentNode.childNodes);
3148
3161
  for (const curNode of childNodes) {
3149
3162
  if (curNode.nodeType === Node.ELEMENT_NODE && element !== curNode) {
3150
- siblings.push(curNode);
3163
+ result.push(curNode);
3151
3164
  }
3152
3165
  }
3153
- return siblings;
3166
+ return result;
3154
3167
  }
3155
3168
  /**
3156
3169
  * set the value if not exist. Otherwise set the existing value
@@ -9901,6 +9914,7 @@ const removeTags = [
9901
9914
  'script',
9902
9915
  'style',
9903
9916
  'iframe[src]',
9917
+ 'iframe[srcdoc]',
9904
9918
  'link[href*="javascript:"]',
9905
9919
  'object[type="text/x-scriptlet"]',
9906
9920
  'object[data^="data:text/html;base64"]',