first commit
This commit is contained in:
12
frontend/node_modules/rc-overflow/es/hooks/channelUpdate.js
generated
vendored
Normal file
12
frontend/node_modules/rc-overflow/es/hooks/channelUpdate.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import raf from "rc-util/es/raf";
|
||||
export default function channelUpdate(callback) {
|
||||
if (typeof MessageChannel === 'undefined') {
|
||||
raf(callback);
|
||||
} else {
|
||||
var channel = new MessageChannel();
|
||||
channel.port1.onmessage = function () {
|
||||
return callback();
|
||||
};
|
||||
channel.port2.postMessage(undefined);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user