As of Chrome 53, untrusted events no longer invoke the default action. https://developer.mozilla.org/en-US/docs/Web/API/Event/isTrusted
Before Chrome 53, this JavaScript would add an interrobang, ?.
var e = document.createEvent('TextEvent');
e.initTextEvent('textInput',
true,
true,
null,
String.fromCharCode( 8253 ));
document.activeElement.dispatchEvent(e);
In Chrome 53, see what happens: https://jsfiddle.net/dblume/2nfhrj1j/10/
Since the event made with createEvent() is untrusted, it doesn't get its data processed by the activeElement like it did in Chrome 52 and before.
My Chrome extension stopped working as of Chrome 53 because it tried to dispatch such a textInput event. What should it do instead now?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…