Skip to content

Conversation

@redaelkhayat
Copy link

#9

Copy link

@Jaivardhan7773 Jaivardhan7773 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 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 🚀

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 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 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants