Skip to content

Commit

Permalink
Added utility function for wizard ace issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenMasterJacob20011 committed May 9, 2024
1 parent 42bed1f commit 0f690c8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,22 @@ export function getElementRect(element) {
};
}

/**
* Get non HTMLElement property in the window object
* @param {String} property
* @return {any || undefined}
*/
export function getScriptPlugin(property) {
const obj = window[property];
if (
typeof HTMLElement === 'object' ? obj instanceof HTMLElement : //DOM2
obj && typeof obj === 'object' && true && obj.nodeType === 1 && typeof obj.nodeName === 'string'
) {
return undefined;
}
return obj;
}

/**
* Determines the boolean value of a setting.
*
Expand Down

0 comments on commit 0f690c8

Please sign in to comment.