简体   繁体   English

addEventListener 事件 Uncaught TypeError: e.stopPropogation is not a function

[英]addEventListener event Uncaught TypeError: e.stopPropogation is not a function

Adding event listener to a button throws将事件侦听器添加到按钮引发

Uncaught TypeError: e.stopPropogation is not a function未捕获的类型错误:e.stopPropogation 不是函数

document.getElementById(`test`).addEventListener('click', (e) => this.handleOpen(e), false)

Handler处理程序

handleOpen = e => {
  e.stopPropagation()
  console.log(e)
  console.log(e.stopPropagation) //undefined
}

您输入错误的传播: https : //developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation

stopPropagation

Typo.错字。 Should be e.stopPropagation应该是 e.stopPropagation

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 e.stopPropogation()是否等效于Click事件的捕获阶段? - e.stopPropogation() Equivalent for Capture Phase of Click Event? 试图理解 e.PreventDefault 和 e.StopPropogation 行为 - Trying to understand e.PreventDefault and e.StopPropogation behavior e.PreventDefault()和e.stopPropogation()在平板电脑和移动设备上不起作用 - e.PreventDefault() & e.stopPropogation() not working on tablet & mobile 未捕获的类型错误:c.addEventListener 不是函数……? javascript DOM 事件 - Uncaught TypeError: c.addEventListener is not a function…? javascript DOM Event event.stopPropogation不是函数 - event.stopPropogation is not a function 单击时保持 wistia 覆盖层打开 - 外部框上的 e.stopPropogation 防止其关闭 - stopPropgation 误解 - keep wistia overlay open on click - e.stopPropogation on outside box preventing it from closing - stopPropgation misunderstanding 未捕获的TypeError:Window.addEventListener不是函数 - Uncaught TypeError: Window.addEventListener is not a function 未捕获到的typeError:input.addEventListener不是函数 - Uncaught typeError : input.addEventListener is not a function 未捕获的类型错误:ele.addEventListener 不是函数 - Uncaught TypeError: ele.addEventListener is not a function 未捕获的TypeError:button.addEventListener不是函数 - Uncaught TypeError: button.addEventListener is not a function
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM