Skip to content

Conversation

@ElizabethSamuel-MSFT
Copy link
Contributor

No description provided.

Copy link
Member

@davidchesnut davidchesnut left a comment

Choose a reason for hiding this comment

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

Looks good, a few suggestions.

document
.getElementById("insert-image-and-create-binding")
.addEventListener("click", () => tryCatch(insertImageWithBinding));
document.getElementById("replace-binding1").addEventListener("click", () => tryCatch(replaceImageinBinding1));
Copy link
Member

Choose a reason for hiding this comment

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

You can get rid of the 1..3 functions by using this syntax to pass the values instead:

document.getElementById("replace-binding1").addEventListener("click", () => tryCatch(() => {replaceBinding(1)}));
document.getElementById("replace-binding2").addEventListener("click", () => tryCatch(() => { replaceBinding(2) }));
document.getElementById("replace-binding3").addEventListener("click", () => tryCatch(() => { replaceBinding(3) }));

});
}

function replaceImageinBinding1() {
Copy link
Member

Choose a reason for hiding this comment

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

You can drop all 3 of these functions if you use the updated trycatch blocks above.

Copy link
Member

@davidchesnut davidchesnut left a comment

Choose a reason for hiding this comment

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

Looks good!

@ElizabethSamuel-MSFT ElizabethSamuel-MSFT merged commit 5706df4 into main May 7, 2025
1 check passed
@ElizabethSamuel-MSFT ElizabethSamuel-MSFT deleted the eliz-ppt-binding-to-shapes branch May 7, 2025 21:21
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.

3 participants