mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Remove ensureScrollValueMonitoring (#9819)
I never actually removed the rest of this when I got rid of ViewportMetrics. We no longer need `ReactDOMEventListener.monitorScrollValue`.
This commit is contained in:
1 parent
3f75ea8cdc
commit
e796d77004
1 file changed
-11
@@ -19,7 +19,6 @@ var ReactGenericBatching = require('ReactGenericBatching');
|
||||
var ReactTypeOfWork = require('ReactTypeOfWork');
|
||||
|
||||
var getEventTarget = require('getEventTarget');
|
||||
var getUnboundedScrollPosition = require('fbjs/lib/getUnboundedScrollPosition');
|
||||
|
||||
var {HostRoot} = ReactTypeOfWork;
|
||||
|
||||
@@ -102,11 +101,6 @@ function handleTopLevelImpl(bookKeeping) {
|
||||
}
|
||||
}
|
||||
|
||||
function scrollValueMonitor(cb) {
|
||||
var scrollPosition = getUnboundedScrollPosition(window);
|
||||
cb(scrollPosition);
|
||||
}
|
||||
|
||||
var ReactDOMEventListener = {
|
||||
_enabled: true,
|
||||
_handleTopLevel: null,
|
||||
@@ -165,11 +159,6 @@ var ReactDOMEventListener = {
|
||||
);
|
||||
},
|
||||
|
||||
monitorScrollValue: function(refresh) {
|
||||
var callback = scrollValueMonitor.bind(null, refresh);
|
||||
EventListener.listen(window, 'scroll', callback);
|
||||
},
|
||||
|
||||
dispatchEvent: function(topLevelType, nativeEvent) {
|
||||
if (!ReactDOMEventListener._enabled) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user