Conversation
Jaivardhan7773
left a comment
There was a problem hiding this comment.
🔥 Great enhancement! Making htmlToInsert accept both a string and an async function adds a lot of flexibility — love the use of await new Promise() here.
One small suggestion: to improve clarity and prevent misuse, you could consider wrapping new Promise(this.options.htmlToInsert) in a helper or add a check for whether the function expects resolve/reject.
But overall, clean upgrade and backward-compatible. Approved 🚀
There was a problem hiding this comment.
🔥 Great enhancement! Making htmlToInsert accept both a string and an async function adds a lot of flexibility — love the use of await new Promise() here.
One small suggestion: to improve clarity and prevent misuse, you could consider wrapping new Promise(this.options.htmlToInsert) in a helper or add a check for whether the function expects resolve/reject.
But overall, clean upgrade and backward-compatible. Approved 🚀
#9