Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
simulateEvent(node, event, ...args) {
const handler = node.props[propFromEvent(event)];
if (handler) {
withSetStateAllowed(() => {
// TODO(lmr): create/use synthetic events
// TODO(lmr): emulate React's event propagation
// ReactDOM.unstable_batchedUpdates(() => {
handler(...args);
// });
});
}
},
batchedUpdates(fn) {
simulateEvent(node, event, ...args) {
const handler = node.props[propFromEvent(event, eventOptions)];
if (handler) {
withSetStateAllowed(() => {
// TODO(lmr): create/use synthetic events
// TODO(lmr): emulate React's event propagation
// ReactDOM.unstable_batchedUpdates(() => {
handler(...args);
// });
});
}
},
batchedUpdates(fn) {
simulateEvent(node, event, ...args) {
const handler = node.props[propFromEvent(event, eventOptions)];
if (handler) {
withSetStateAllowed(() => {
// TODO(lmr): create/use synthetic events
// TODO(lmr): emulate React's event propagation
ReactDOM.unstable_batchedUpdates(() => {
handler(...args);
});
});
}
},
batchedUpdates(fn) {
simulateEvent(node, event, ...args) {
const handler = node.props[propFromEvent(event)];
if (handler) {
let returned;
withSetStateAllowed(() => {
// TODO(lmr): create/use synthetic events
// TODO(lmr): emulate React's event propagation
// ReactDOM.unstable_batchedUpdates(() => {
returned = handler(...args);
// });
});
return returned;
}
},
batchedUpdates(fn) {
simulateEvent(node, event, ...args) {
const handler = node.props[propFromEvent(event)];
if (handler) {
withSetStateAllowed(() => {
// TODO(lmr): create/use synthetic events
// TODO(lmr): emulate React's event propagation
batchedUpdates(() => {
handler(...args);
});
});
}
},
batchedUpdates(fn) {
simulateEvent(node, event, ...args) {
const handler = node.props[propFromEvent(event)];
if (handler) {
withSetStateAllowed(() => {
// TODO(lmr): create/use synthetic events
// TODO(lmr): emulate React's event propagation
// ReactDOM.unstable_batchedUpdates(() => {
handler(...args);
// });
});
}
},
batchedUpdates(fn) {
simulateEvent(node, event, ...args) {
const handler = node.props[propFromEvent(event)];
if (handler) {
withSetStateAllowed(() => {
// TODO(lmr): create/use synthetic events
// TODO(lmr): emulate React's event propagation
batchedUpdates(() => {
handler(...args);
});
});
}
},
batchedUpdates(fn) {
simulateEvent(node, event, ...args) {
const handler = node.props[propFromEvent(event)];
if (handler) {
withSetStateAllowed(() => {
// TODO(lmr): create/use synthetic events
// TODO(lmr): emulate React's event propagation
ReactDOM.unstable_batchedUpdates(() => {
handler(...args);
});
});
}
},
batchedUpdates(fn) {
simulateEvent(node, event, ...args) {
const handler = node.props[propFromEvent(event, eventOptions)];
if (handler) {
withSetStateAllowed(() => {
// TODO(lmr): create/use synthetic events
// TODO(lmr): emulate React's event propagation
// ReactDOM.unstable_batchedUpdates(() => {
handler(...args);
// });
});
}
},
batchedUpdates(fn) {
simulateEvent(node, event, ...args) {
const handler = node.props[propFromEvent(event)];
if (handler) {
withSetStateAllowed(() => handler(...args));
}
},
batchedUpdates(fn) {