javascript - FireFox does not support Event, does anyone know how to convert it?
给我你的怀抱
给我你的怀抱 2017-06-26 10:53:53
0
3
732

I have been searching online for a long time but there is no solution

var theEvent = window.event || arguments.callee.caller.arguments[0];
var srcElement = theEvent.srcElement;

Use this kind of error, arguments ESLint: Avoid arguments.callee (no-call)
ES6 prohibits the call of arguments.callee.
Are you kidding me?
Save the great god and give me some advice! ! ! ! ! ! !

给我你的怀抱
给我你的怀抱

reply all(3)
小葫芦

Add event parameters in the event, for example
<button onclick="func(e)"></button>
var func = (e) => { alert(e || window.event ); }

Ty80

Firefox does not support event solution: http://blog.csdn.net/cyxlzzs/...

曾经蜡笔没有小新

If you are not using arrow functions, add a comment.

/* eslint-disable */
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template