mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-03 18:52:07 +00:00
[add] BackAndroid API stub
This commit is contained in:
committed by
Nicolas Gallagher
parent
bc68b0b6f4
commit
ba75acb66a
@@ -0,0 +1,28 @@
|
|||||||
|
/**
|
||||||
|
* Copyright (c) 2015-present, Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD-style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*
|
||||||
|
* web stub for BackAndroid.android.js
|
||||||
|
*
|
||||||
|
* @providesModule BackAndroid
|
||||||
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function emptyFunction() {}
|
||||||
|
|
||||||
|
const BackAndroid = {
|
||||||
|
exitApp: emptyFunction,
|
||||||
|
addEventListener() {
|
||||||
|
return {
|
||||||
|
remove: emptyFunction
|
||||||
|
};
|
||||||
|
},
|
||||||
|
removeEventListener: emptyFunction
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = BackAndroid;
|
||||||
@@ -9,6 +9,7 @@ import Animated from './apis/Animated';
|
|||||||
import AppRegistry from './apis/AppRegistry';
|
import AppRegistry from './apis/AppRegistry';
|
||||||
import AppState from './apis/AppState';
|
import AppState from './apis/AppState';
|
||||||
import AsyncStorage from './apis/AsyncStorage';
|
import AsyncStorage from './apis/AsyncStorage';
|
||||||
|
import BackAndroid from './apis/BackAndroid';
|
||||||
import Clipboard from './apis/Clipboard';
|
import Clipboard from './apis/Clipboard';
|
||||||
import Dimensions from './apis/Dimensions';
|
import Dimensions from './apis/Dimensions';
|
||||||
import Easing from 'animated/lib/Easing';
|
import Easing from 'animated/lib/Easing';
|
||||||
@@ -59,6 +60,7 @@ const ReactNative = {
|
|||||||
AppRegistry,
|
AppRegistry,
|
||||||
AppState,
|
AppState,
|
||||||
AsyncStorage,
|
AsyncStorage,
|
||||||
|
BackAndroid,
|
||||||
Clipboard,
|
Clipboard,
|
||||||
Dimensions,
|
Dimensions,
|
||||||
Easing,
|
Easing,
|
||||||
|
|||||||
Reference in New Issue
Block a user