documentation: document the event object passed in event handlers
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
The documentation shows event handlers as not having any input parameters.
It seems that the event is passed in and has this form:
{type: "load", target: Map}
Is it possible to document this event argument?
-----------------
https://docs.mapbox.com/mapbox-gl-js/api/map/#map.event:load
Fired immediately after all necessary resources have been downloaded and the first visually complete rendering of the map has occurred.
Example
```
// Initialize the map
var map = new mapboxgl.Map({ // map options });
// Set an event listener that fires
// when the map has finished loading.
map.on('load', function() {
console.log('A load event occurred.');
});
```
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Map.event:load documentation page linked in the issue and inspect how event handlers and event objects are described elsewhere in the API documentation. Document the event argument and its shown shape for the load handler, while keeping the example consistent with the documented signature.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100