Skip to content

Commit

Permalink
Add notes in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
williamngan committed Nov 6, 2019
1 parent 6a8c696 commit b167f1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ export class UIButton extends UI {


/**
* Add a new contextmenu handler. `contextmenu` is similar to right click, see the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/Element/contextmenu_event). Remember this button will also need to be tracked for events via `UI.track`.
* Add a new contextmenu handler. `contextmenu` is similar to right click, see the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/Element/contextmenu_event). Remember this button will also need to be tracked for events via `UI.track`. Also note that you may need to use `event.preventDefault()` in the callback function to prevent other events from triggering.
* @param fn a [`UIHandler`](#link) callback function: `fn( target:UI, pt:Pt, type:string, evt:MouseEvent )`
* @returns an id number that refers to this handler, for use in [`UIButton.offContextMenu`](#link) or [`UI.off`](#link).
*/
Expand Down

0 comments on commit b167f1b

Please sign in to comment.