microsoft / TypeScript-DOM-lib-generator

Tool for generating dom related TypeScript and JavaScript library files
Apache License 2.0
616 stars 417 forks source link

Remove invalid documentation for pause method of HTMLMediaElement #1666

Closed thkruz closed 9 months ago

thkruz commented 9 months ago

Fairly simple one. Since there is no return value, the paused property should be used for testing if a media element is paused instead of the pause method.

Looking at the spec

The paused attribute represents whether the media element is paused or not.

That comment has been there 6 years, so I am not sure of the origin, but it confused me so I made the PR.

References: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/paused

github-actions[bot] commented 9 months ago

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

thkruz commented 9 months ago

@microsoft-github-policy-service agree

saschanaz commented 9 months ago

Yeah, it has been there forever since 2015:

https://github.com/microsoft/TypeScript-DOM-lib-generator/blob/34bf3527d372ec24eac132a596096e61575fc7e8/inputfiles/comments.json#L2650-L2653

Perhaps it was somewhere from MSDN?

saschanaz commented 9 months ago

LGTM

github-actions[bot] commented 9 months ago

Merging because @saschanaz is a code-owner of all the changes - thanks!

thkruz commented 9 months ago

Yeah, it has been there forever since 2015:

Haha yea when I saw that I assumed I was wrong since no one else has fixed it.

Perhaps it was somewhere from MSDN?

I couldn't find it on google, but who knows what i might have found back then.

Regardless, glad to help. Thanks.