@ray-core/runtime
Version:
Ray 是一个全新的基于 React 的小程序开发框架
8 lines (7 loc) • 409 B
JavaScript
import { initGlobalStore } from '../gStore';
// Ray构建的原生组件自成闭包环境,所以和项目构建会产生多少个上下文
// 因此该变量需要设置在全局作用域下
export var isPropagationStopped = initGlobalStore('event_propagation_stopped', function () { return ({}); });
export default function stopPropagation(node, eventType) {
isPropagationStopped[eventType] = true;
}