Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created April 1, 2024 17:58
Show Gist options
  • Save bjoerntx/9485796bcc75ef56fd2a204299c9c319 to your computer and use it in GitHub Desktop.
Save bjoerntx/9485796bcc75ef56fd2a204299c9c319 to your computer and use it in GitHub Desktop.
async function processComments() {
TXTextControl.comments.forEach(async (comment) => {
const replies = await new Promise((resolve, reject) => {
comment.getReplies((replies) => {
resolve(replies);
});
});
replies.forEach(async (reply) => {
const replyComment = await new Promise((resolve, reject) => {
reply.getComment((replyComment) => {
resolve(replyComment);
});
});
console.log(replyComment);
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment