New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
refac(purify): Add utils jsdoc & code consistency tasks #843
Conversation
@@ -195,7 +196,7 @@ function createDOMPurify(window = getGlobal()) { | |||
* @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`. | |||
*/ | |||
let CUSTOM_ELEMENT_HANDLING = Object.seal( | |||
Object.create(null, { | |||
create(null, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified to import and utilize the create
function from utils.js
return fun.apply(thisValue, args); | ||
}; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I placed it above construct
(Reflect-related)
* @param {Function} func - The function to be wrapped and called. | ||
* @returns {Function} A new function that applies the original function with provided thisArg and arguments. | ||
*/ | ||
function unapply(func) { | ||
return (thisArg, ...args) => apply(func, thisArg, args); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from adding jsdoc
, I moved export to the bottom.
@@ -9,12 +9,6 @@ const { | |||
let { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I exported the create
here.
LGTM, thank you! |
Summary
Hello 馃憢 @cure53
This time I added the jsdoc of the utils functions.
I also worked on consistency in the code, similar to before.
Please review this pull request to see if it's appropriate. 馃檹
Tasks