Skip to content

Commit

Permalink
Docs: Improve BackHandler documentation (addEventListener and removeE…
Browse files Browse the repository at this point in the history
…ventListener)
  • Loading branch information
Adriano Melo committed Oct 31, 2017
1 parent 1dca01b commit 622d6a8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Libraries/Utilities/BackHandler.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ var BackHandler = {
DeviceEventManager.invokeDefaultBackPressHandler();
},

/**
* Adds an event handler. Supported events:
*
* - `hardwareBackPress`: Fires when the Android hardware back button is pressed or when the
* tvOS menu button is pressed.
*/
addEventListener: function (
eventName: BackPressEventName,
handler: Function
Expand All @@ -84,6 +90,9 @@ var BackHandler = {
};
},

/**
* Removes the event handler.
*/
removeEventListener: function(
eventName: BackPressEventName,
handler: Function
Expand Down

0 comments on commit 622d6a8

Please sign in to comment.