Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(new): add TSDoc comments to the Frame class #5995

Closed
wants to merge 1 commit into from
Closed

docs(new): add TSDoc comments to the Frame class #5995

wants to merge 1 commit into from

Conversation

kaycebasques
Copy link

@jackfranklin || @mathiasbynens please let me know if I'm on the right track

@@ -360,6 +360,80 @@ export class FrameManager extends EventEmitter {
}
}

/**
* At every point of time, page exposes its current frame tree via the [page.mainFrame()](#pagemainframe) and [frame.childFrames()](#framechildframes) methods.
Copy link
Author

Choose a reason for hiding this comment

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

Usage of the is a bit inconsistent. Here page is described without the in front of it. But on line 367 it's the page.

Copy link
Collaborator

Choose a reason for hiding this comment

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

you'll need to swap the links for the @link syntax that TSDoc uses: https://api-extractor.com/pages/tsdoc/tag_link/

* [Frame] object's lifecycle is controlled by three events, dispatched on the page object:
* - ['frameattached'](#event-frameattached) - fired when the frame gets attached to the page. A Frame can be attached to the page only once.
* - ['framenavigated'](#event-framenavigated) - fired when the frame commits navigation to a different URL.
* - ['framedetached'](#event-framedetached) - fired when the frame gets detached from the page. A Frame can be detached from the page only once.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Once these are documented on the Page class we can link to them but we won't be able to yet - so maybe just make these:

. framedetached - fires when the ...

* console.log(text);
* ```
*
* @public
Copy link
Collaborator

Choose a reason for hiding this comment

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

this looks great - I think you'll want to use @remarks to split a summary from the full description: https://api-extractor.com/pages/tsdoc/tag_remarks/

@jackfranklin
Copy link
Collaborator

@kaycebasques definitely on the right track :) Thank you!

@mathiasbynens mathiasbynens changed the base branch from master to main June 15, 2020 14:37
@mathiasbynens mathiasbynens changed the title Add API documentation comments for the Frame class docs(new): add TSDoc comments to the Frame class Jun 23, 2020
@jackfranklin
Copy link
Collaborator

@kaycebasques hey, do you have any time soon to finish this off? Doesn't matter at all, I'm very happy to do the final tidying up and merge it, but don't want to if you're planning to :)

@jackfranklin
Copy link
Collaborator

#6188 picks this up and adds docs for all the frame methods, building off this start. Thanks @kaycebasques :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants