Bug 1299453 - Stop using createEvent("DragEvents"/"KeyEvents") internally; r=smaug

They are non-standard aliases for "DragEvent" and "KeyboardEvent" that
are not supported by any other UA, and we would like to drop support.
So first let's stop using them ourselves, so we can use telemetry to see
if any sites are using them.

MozReview-Commit-ID: ICC33ORa2st
This commit is contained in:
Aryeh Gregor
2016-08-31 16:24:40 +03:00
parent 8e6b8445cc
commit fd7d844ea6
29 changed files with 42 additions and 42 deletions

View File

@@ -46,7 +46,7 @@ function promiseFindResult(findbar, str = null) {
function promiseEnterStringIntoFindField(findbar, str) {
let promise = promiseFindResult(findbar, str);
for (let i = 0; i < str.length; i++) {
let event = document.createEvent("KeyEvents");
let event = document.createEvent("KeyboardEvent");
event.initKeyEvent("keypress", true, true, null, false, false,
false, false, 0, str.charCodeAt(i));
findbar._findField.inputField.dispatchEvent(event);