Skip to content

Add remove handler method #50

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

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

khamaileon
Copy link
Contributor

I needed the remove_handler ASAP, so I moved it to a separate request. I also wrote some unit tests for it. I didn’t handle the “module” parameter because I believe it’s unnecessary, even in add_handler. However, if someone thinks it’s useful, I can add it.

I’m not sure about the documentation, do we need to generate something for this?

Copy link
Owner

@stephanlensky stephanlensky left a comment

Choose a reason for hiding this comment

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

Thanks for the submission @khamaileon.

I honestly haven't put much thought into documentation - if you'd like to add some though, please go ahead. Note that a few sections are autogenerated, so before running mkdocs serve you should first run each of the mkdocs_* scripts in the scripts/ folder.

After that, you can do

uv run mkdocs serve

And add any pages you'd like, following the mkdocs-material docs here.

@stephanlensky
Copy link
Owner

I'll merge this for now, and feel free to open another PR for docs if you'd like.

@stephanlensky stephanlensky merged commit fb1f01b into stephanlensky:main Feb 6, 2025
1 check passed
@khamaileon
Copy link
Contributor Author

@stephanlensky I think we should have at least the same autogenerated documentation as Nodriver, at least those kinds of pages:

@stephanlensky
Copy link
Owner

stephanlensky commented Feb 6, 2025

Makes sense, I already set up something similar for the cdp module here: https://slensky.com/zendriver/reference/cdp/accessibility/

This is generated by scripts/mkdocs_generate_reference.py

Honestly, I wasn't super happy with how it turned out though, I think nodriver's version is a bit easier to read. They are using some different tools to generate the docs.

I'd be happy to accept any improvements here/add some additional classes to the auto-generated docs

stephanlensky pushed a commit that referenced this pull request Feb 7, 2025
* Add remove handler method

* Add ability to remove all handlers at once
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.

2 participants