Skip to content

Conversation

@Fan-iX
Copy link

@Fan-iX Fan-iX commented Nov 29, 2025

Description

Replace console.log with log in the HTMLElement toggle event page.

Motivation

No text is displayed in the log pre element after clicking the toggle button.

A explicit log function is defined but not used.

Additional details

The beforetoggle_event page uses the explicit log function.

popover.addEventListener("beforetoggle", (event) => {
if (event.newState === "open") {
log("Popover is about to be shown");
} else {
log("Popover is about to be hidden");
}
});
```

A explicit `log` function is defined but not used in this page.

This PR replaces `console.log` with `log`, making it consistent with the `beforetoggle_event` page.

https://github.com/mdn/content/blob/39070892d5d1a5cc55312a0ac10c97f4c339384f/files/en-us/web/api/htmlelement/beforetoggle_event/index.md?plain=1#L86-L90
@Fan-iX Fan-iX requested a review from a team as a code owner November 29, 2025 09:00
@Fan-iX Fan-iX requested review from sideshowbarker and removed request for a team November 29, 2025 09:00
@github-actions github-actions bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Nov 29, 2025
@sideshowbarker sideshowbarker removed their request for review November 29, 2025 23:35
@github-actions
Copy link
Contributor

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

Labels

Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant