Contributing Guidelines
Thank you for your interest in contributing to DOM Helpers! Every contribution — whether it's a bug report, a documentation fix, or a new feature — helps make the library better for everyone.
Ways to Contribute
Report a Bug
If you found something that isn't working as expected:
- Check the existing issues to see if it's already reported
- If not, open a new issue with:
- A clear title describing the problem
- The module and method involved (e.g.
Elements.update()) - A minimal code snippet that reproduces the bug
- What you expected to happen vs. what actually happened
- Your browser and environment
Suggest a Feature
Have an idea that would make DOM Helpers more useful?
- Open an issue with the label
enhancement - Describe the use case — what problem does this solve?
- Show what the API might look like with a code example
Improve the Documentation
Documentation contributions are especially welcome. If a page is unclear, missing an example, or contains a typo:
- Fork the repository
- Edit the relevant
.mdfile inside thedocs/folder - Submit a pull request with a short description of what you changed and why
Submit a Pull Request
For code changes:
- Fork the repository and create a branch from
main - Name your branch descriptively:
fix/collections-update-bugorfeat/selector-waitfor - Make your changes in the
src/folder - Keep each pull request focused on a single change — avoid bundling unrelated fixes
- Write a clear PR description explaining what changed and why
- Submit the pull request against the
mainbranch
Code Style
- Use plain JavaScript — no TypeScript, no build-step dependencies
- Follow the IIFE module pattern used in existing files:
(function(global) { ... })(window) - Keep each module self-contained — avoid cross-module dependencies unless intentional
- Add JSDoc comments for any new public methods following the existing style
- Do not introduce external dependencies
Commit Messages
Use short, descriptive commit messages in the imperative mood:
fix: resolve Collections.update null reference on empty selector
feat: add Router.enableScrollMemory to guards module
docs: clarify onCleanup usage in SPA Router pageQuestions
If you're unsure about anything before opening a PR, open an issue first and describe what you're planning. It's easier to align early than to review a large change that goes in the wrong direction.
Thank you for using DOM Helpers! Your feedback and support help make this library better for everyone.