forked from mirrors/gecko-dev
Bug 1252803 - Enable ESLint on the rest of devtools (manual changes). r=jdescottes
Depends on D57223 Differential Revision: https://phabricator.services.mozilla.com/D57265 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8a787e9be0
commit
23e7aaa178
33 changed files with 270 additions and 258 deletions
|
|
@ -56,14 +56,8 @@ browser/locales/
|
||||||
# Generated data files
|
# Generated data files
|
||||||
browser/extensions/formautofill/phonenumberutils/PhoneNumberMetaData.jsm
|
browser/extensions/formautofill/phonenumberutils/PhoneNumberMetaData.jsm
|
||||||
|
|
||||||
# devtools/ exclusions
|
# Soon to be removed (bug 1609815)
|
||||||
devtools/client/inspector/markup/test/doc_markup_events_*.html
|
devtools/client/webreplay/
|
||||||
devtools/client/performance/components/test/test_jit_optimizations_01.html
|
|
||||||
devtools/server/tests/browser/storage-*.html
|
|
||||||
!devtools/server/tests/browser/storage-unsecured-iframe.html
|
|
||||||
devtools/server/tests/browser/stylesheets-nested-iframes.html
|
|
||||||
devtools/client/webreplay/mochitest/examples/*.html
|
|
||||||
devtools/client/webreplay/mochitest/examples/
|
|
||||||
|
|
||||||
# Ignore devtools debugger files which aren't intended for linting, and also
|
# Ignore devtools debugger files which aren't intended for linting, and also
|
||||||
# aren't included in any .eslintignore or .prettierignore file.
|
# aren't included in any .eslintignore or .prettierignore file.
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ const TEST_URL = URL_ROOT + "doc_markup_events_01.html";
|
||||||
|
|
||||||
loadHelperScript("helper_events_test_runner.js");
|
loadHelperScript("helper_events_test_runner.js");
|
||||||
|
|
||||||
const TEST_DATA = [ // eslint-disable-line
|
const TEST_DATA = [
|
||||||
{
|
{
|
||||||
selector: "html",
|
selector: "html",
|
||||||
expected: [
|
expected: [
|
||||||
|
|
@ -28,12 +28,12 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "mouseover",
|
type: "mouseover",
|
||||||
filename: TEST_URL + ":45:31",
|
filename: TEST_URL + ":48:31",
|
||||||
attributes: ["Capturing", "DOM2"],
|
attributes: ["Capturing", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function mouseoverHandler(event) {\n" +
|
"function mouseoverHandler(event) {\n" +
|
||||||
' if (event.target.id !== "container") {\n' +
|
' if (event.target.id !== "container") {\n' +
|
||||||
' let output = document.getElementById("output");\n' +
|
' const output = document.getElementById("output");\n' +
|
||||||
" output.textContent = event.target.textContent;\n" +
|
" output.textContent = event.target.textContent;\n" +
|
||||||
" }\n" +
|
" }\n" +
|
||||||
"}",
|
"}",
|
||||||
|
|
@ -45,21 +45,21 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":52:27",
|
filename: TEST_URL + ":55:27",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function clickHandler(event) {\n" +
|
"function clickHandler(event) {\n" +
|
||||||
' let output = document.getElementById("output");\n' +
|
' const output = document.getElementById("output");\n' +
|
||||||
' output.textContent = "click";\n' +
|
' output.textContent = "click";\n' +
|
||||||
"}",
|
"}",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "mouseup",
|
type: "mouseup",
|
||||||
filename: TEST_URL + ":57:29",
|
filename: TEST_URL + ":60:29",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function mouseupHandler(event) {\n" +
|
"function mouseupHandler(event) {\n" +
|
||||||
' let output = document.getElementById("output");\n' +
|
' const output = document.getElementById("output");\n' +
|
||||||
' output.textContent = "mouseup";\n' +
|
' output.textContent = "mouseup";\n' +
|
||||||
"}",
|
"}",
|
||||||
},
|
},
|
||||||
|
|
@ -81,7 +81,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":72:35",
|
filename: TEST_URL + ":75:35",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function noeventsClickHandler(event) {\n" +
|
"function noeventsClickHandler(event) {\n" +
|
||||||
|
|
@ -117,7 +117,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":67:29",
|
filename: TEST_URL + ":70:29",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "function(blah) {\n" + ' alert("handleEvent");\n' + "}",
|
handler: "function(blah) {\n" + ' alert("handleEvent");\n' + "}",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -11,25 +11,25 @@ const TEST_URL = URL_ROOT + "doc_markup_events_02.html";
|
||||||
|
|
||||||
loadHelperScript("helper_events_test_runner.js");
|
loadHelperScript("helper_events_test_runner.js");
|
||||||
|
|
||||||
const TEST_DATA = [ // eslint-disable-line
|
const TEST_DATA = [
|
||||||
{
|
{
|
||||||
selector: "#fatarrow",
|
selector: "#fatarrow",
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":39:43",
|
filename: TEST_URL + ":42:43",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "() => {\n" + ' alert("Fat arrow without params!");\n' + "}",
|
handler: "() => {\n" + ' alert("Fat arrow without params!");\n' + "}",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":43:43",
|
filename: TEST_URL + ":46:43",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "event => {\n" + ' alert("Fat arrow with 1 param!");\n' + "}",
|
handler: "event => {\n" + ' alert("Fat arrow with 1 param!");\n' + "}",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":47:43",
|
filename: TEST_URL + ":50:43",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"(event, foo, bar) => {\n" +
|
"(event, foo, bar) => {\n" +
|
||||||
|
|
@ -38,7 +38,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":51:43",
|
filename: TEST_URL + ":54:43",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "b => b",
|
handler: "b => b",
|
||||||
},
|
},
|
||||||
|
|
@ -49,7 +49,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":62:32",
|
filename: TEST_URL + ":65:32",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "function(event) {\n" + ' alert("Bound event");\n' + "}",
|
handler: "function(event) {\n" + ' alert("Bound event");\n' + "}",
|
||||||
},
|
},
|
||||||
|
|
@ -60,7 +60,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":85:29",
|
filename: TEST_URL + ":88:29",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "function() {\n" + ' alert("boundHandleEvent");\n' + "}",
|
handler: "function() {\n" + ' alert("boundHandleEvent");\n' + "}",
|
||||||
},
|
},
|
||||||
|
|
@ -71,7 +71,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":91:47",
|
filename: TEST_URL + ":94:47",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function functionProceededByInlineComment() {\n" +
|
"function functionProceededByInlineComment() {\n" +
|
||||||
|
|
@ -85,7 +85,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":96:50",
|
filename: TEST_URL + ":99:50",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function functionProceededByStreamingComment() {\n" +
|
"function functionProceededByStreamingComment() {\n" +
|
||||||
|
|
@ -99,7 +99,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":71:34",
|
filename: TEST_URL + ":74:34",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "function() {\n" + ' alert("obj.anonObjectMethod");\n' + "}",
|
handler: "function() {\n" + ' alert("obj.anonObjectMethod");\n' + "}",
|
||||||
},
|
},
|
||||||
|
|
@ -110,7 +110,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":75:34",
|
filename: TEST_URL + ":78:34",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "function kay() {\n" + ' alert("obj.objectMethod");\n' + "}",
|
handler: "function kay() {\n" + ' alert("obj.objectMethod");\n' + "}",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,13 @@ const TEST_URL = URL_ROOT + "doc_markup_events_03.html";
|
||||||
|
|
||||||
loadHelperScript("helper_events_test_runner.js");
|
loadHelperScript("helper_events_test_runner.js");
|
||||||
|
|
||||||
const TEST_DATA = [ // eslint-disable-line
|
const TEST_DATA = [
|
||||||
{
|
{
|
||||||
selector: "#es6-method",
|
selector: "#es6-method",
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":66:17",
|
filename: TEST_URL + ":69:17",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"es6Method(foo, bar) {\n" + ' alert("obj.es6Method");\n' + "}",
|
"es6Method(foo, bar) {\n" + ' alert("obj.es6Method");\n' + "}",
|
||||||
|
|
@ -29,7 +29,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":85:25",
|
filename: TEST_URL + ":88:25",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "function* generator() {\n" + ' alert("generator");\n' + "}",
|
handler: "function* generator() {\n" + ' alert("generator");\n' + "}",
|
||||||
},
|
},
|
||||||
|
|
@ -40,7 +40,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":43:58",
|
filename: TEST_URL + ":46:58",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "function*() {\n" + ' alert("anonGenerator");\n' + "}",
|
handler: "function*() {\n" + ' alert("anonGenerator");\n' + "}",
|
||||||
},
|
},
|
||||||
|
|
@ -51,7 +51,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":20:18",
|
filename: TEST_URL + ":22:18",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function foo() {\n" + ' alert("namedFunctionExpression");\n' + "}",
|
"function foo() {\n" + ' alert("namedFunctionExpression");\n' + "}",
|
||||||
|
|
@ -63,7 +63,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":24:43",
|
filename: TEST_URL + ":26:45",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function() {\n" + ' alert("anonFunctionExpression");\n' + "}",
|
"function() {\n" + ' alert("anonFunctionExpression");\n' + "}",
|
||||||
|
|
@ -75,7 +75,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":29:27",
|
filename: TEST_URL + ":31:27",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: "function bar() {\n" + ' alert("returnedFunction");\n' + "}",
|
handler: "function bar() {\n" + ' alert("returnedFunction");\n' + "}",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,13 @@ const TEST_URL = URL_ROOT + "doc_markup_events_04.html";
|
||||||
|
|
||||||
loadHelperScript("helper_events_test_runner.js");
|
loadHelperScript("helper_events_test_runner.js");
|
||||||
|
|
||||||
const TEST_DATA = [ // eslint-disable-line
|
const TEST_DATA = [
|
||||||
{
|
{
|
||||||
selector: "html",
|
selector: "html",
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":56:67",
|
filename: TEST_URL + ":59:67",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function(foo2, bar2) {\n" +
|
"function(foo2, bar2) {\n" +
|
||||||
|
|
@ -26,7 +26,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":52:51",
|
filename: TEST_URL + ":55:51",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function(foo, bar) {\n" +
|
"function(foo, bar) {\n" +
|
||||||
|
|
@ -71,7 +71,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":24:57",
|
filename: TEST_URL + ":26:47",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function multi() {\n" + ' alert("multipleAssignment");\n' + "}",
|
"function multi() {\n" + ' alert("multipleAssignment");\n' + "}",
|
||||||
|
|
@ -105,7 +105,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":77:29",
|
filename: TEST_URL + ":80:29",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler:
|
handler:
|
||||||
"function(event) {\n" +
|
"function(event) {\n" +
|
||||||
|
|
|
||||||
|
|
@ -44,41 +44,41 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "load",
|
type: "load",
|
||||||
filename: TEST_URL + ":27:38",
|
filename: TEST_URL + ":29:38",
|
||||||
attributes: [
|
attributes: [
|
||||||
"Bubbling",
|
"Bubbling",
|
||||||
"DOM2"
|
"DOM2"
|
||||||
],
|
],
|
||||||
handler: `
|
handler: `
|
||||||
() => {
|
() => {
|
||||||
var handler1 = function liveDivDblClick() {
|
const handler1 = function liveDivDblClick() {
|
||||||
alert(1);
|
alert(1);
|
||||||
};
|
};
|
||||||
var handler2 = function liveDivDragStart() {
|
const handler2 = function liveDivDragStart() {
|
||||||
alert(2);
|
alert(2);
|
||||||
};
|
};
|
||||||
var handler3 = function liveDivDragLeave() {
|
const handler3 = function liveDivDragLeave() {
|
||||||
alert(3);
|
alert(3);
|
||||||
};
|
};
|
||||||
var handler4 = function liveDivDragEnd() {
|
const handler4 = function liveDivDragEnd() {
|
||||||
alert(4);
|
alert(4);
|
||||||
};
|
};
|
||||||
var handler5 = function liveDivDrop() {
|
const handler5 = function liveDivDrop() {
|
||||||
alert(5);
|
alert(5);
|
||||||
};
|
};
|
||||||
var handler6 = function liveDivDragOver() {
|
const handler6 = function liveDivDragOver() {
|
||||||
alert(6);
|
alert(6);
|
||||||
};
|
};
|
||||||
var handler7 = function divClick1() {
|
const handler7 = function divClick1() {
|
||||||
alert(7);
|
alert(7);
|
||||||
};
|
};
|
||||||
var handler8 = function divClick2() {
|
const handler8 = function divClick2() {
|
||||||
alert(8);
|
alert(8);
|
||||||
};
|
};
|
||||||
var handler9 = function divKeyDown() {
|
const handler9 = function divKeyDown() {
|
||||||
alert(9);
|
alert(9);
|
||||||
};
|
};
|
||||||
var handler10 = function divDragOut() {
|
const handler10 = function divDragOut() {
|
||||||
alert(10);
|
alert(10);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -98,7 +98,7 @@ const TEST_DATA = [
|
||||||
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var div = $("div")[0];
|
const div = $("div")[0];
|
||||||
$(div).click(handler7);
|
$(div).click(handler7);
|
||||||
$(div).click(handler8);
|
$(div).click(handler8);
|
||||||
$(div).keydown(handler9);
|
$(div).keydown(handler9);
|
||||||
|
|
@ -142,7 +142,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":34:41",
|
filename: TEST_URL + ":36:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -153,7 +153,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":35:41",
|
filename: TEST_URL + ":37:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -195,7 +195,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "keydown",
|
type: "keydown",
|
||||||
filename: TEST_URL + ":36:42",
|
filename: TEST_URL + ":38:44",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -18,41 +18,41 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "load",
|
type: "load",
|
||||||
filename: TEST_URL + ":27:38",
|
filename: TEST_URL + ":29:38",
|
||||||
attributes: [
|
attributes: [
|
||||||
"Bubbling",
|
"Bubbling",
|
||||||
"DOM2"
|
"DOM2"
|
||||||
],
|
],
|
||||||
handler: `
|
handler: `
|
||||||
() => {
|
() => {
|
||||||
var handler1 = function liveDivDblClick() {
|
const handler1 = function liveDivDblClick() {
|
||||||
alert(1);
|
alert(1);
|
||||||
};
|
};
|
||||||
var handler2 = function liveDivDragStart() {
|
const handler2 = function liveDivDragStart() {
|
||||||
alert(2);
|
alert(2);
|
||||||
};
|
};
|
||||||
var handler3 = function liveDivDragLeave() {
|
const handler3 = function liveDivDragLeave() {
|
||||||
alert(3);
|
alert(3);
|
||||||
};
|
};
|
||||||
var handler4 = function liveDivDragEnd() {
|
const handler4 = function liveDivDragEnd() {
|
||||||
alert(4);
|
alert(4);
|
||||||
};
|
};
|
||||||
var handler5 = function liveDivDrop() {
|
const handler5 = function liveDivDrop() {
|
||||||
alert(5);
|
alert(5);
|
||||||
};
|
};
|
||||||
var handler6 = function liveDivDragOver() {
|
const handler6 = function liveDivDragOver() {
|
||||||
alert(6);
|
alert(6);
|
||||||
};
|
};
|
||||||
var handler7 = function divClick1() {
|
const handler7 = function divClick1() {
|
||||||
alert(7);
|
alert(7);
|
||||||
};
|
};
|
||||||
var handler8 = function divClick2() {
|
const handler8 = function divClick2() {
|
||||||
alert(8);
|
alert(8);
|
||||||
};
|
};
|
||||||
var handler9 = function divKeyDown() {
|
const handler9 = function divKeyDown() {
|
||||||
alert(9);
|
alert(9);
|
||||||
};
|
};
|
||||||
var handler10 = function divDragOut() {
|
const handler10 = function divDragOut() {
|
||||||
alert(10);
|
alert(10);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ const TEST_DATA = [
|
||||||
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var div = $("div")[0];
|
const div = $("div")[0];
|
||||||
$(div).click(handler7);
|
$(div).click(handler7);
|
||||||
$(div).click(handler8);
|
$(div).click(handler8);
|
||||||
$(div).keydown(handler9);
|
$(div).keydown(handler9);
|
||||||
|
|
@ -126,7 +126,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":34:41",
|
filename: TEST_URL + ":36:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -137,7 +137,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":35:41",
|
filename: TEST_URL + ":37:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -189,7 +189,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "keydown",
|
type: "keydown",
|
||||||
filename: TEST_URL + ":36:42",
|
filename: TEST_URL + ":38:44",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -18,41 +18,41 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "load",
|
type: "load",
|
||||||
filename: TEST_URL + ":27:38",
|
filename: TEST_URL + ":29:38",
|
||||||
attributes: [
|
attributes: [
|
||||||
"Bubbling",
|
"Bubbling",
|
||||||
"DOM2"
|
"DOM2"
|
||||||
],
|
],
|
||||||
handler: `
|
handler: `
|
||||||
() => {
|
() => {
|
||||||
var handler1 = function liveDivDblClick() {
|
const handler1 = function liveDivDblClick() {
|
||||||
alert(1);
|
alert(1);
|
||||||
};
|
};
|
||||||
var handler2 = function liveDivDragStart() {
|
const handler2 = function liveDivDragStart() {
|
||||||
alert(2);
|
alert(2);
|
||||||
};
|
};
|
||||||
var handler3 = function liveDivDragLeave() {
|
const handler3 = function liveDivDragLeave() {
|
||||||
alert(3);
|
alert(3);
|
||||||
};
|
};
|
||||||
var handler4 = function liveDivDragEnd() {
|
const handler4 = function liveDivDragEnd() {
|
||||||
alert(4);
|
alert(4);
|
||||||
};
|
};
|
||||||
var handler5 = function liveDivDrop() {
|
const handler5 = function liveDivDrop() {
|
||||||
alert(5);
|
alert(5);
|
||||||
};
|
};
|
||||||
var handler6 = function liveDivDragOver() {
|
const handler6 = function liveDivDragOver() {
|
||||||
alert(6);
|
alert(6);
|
||||||
};
|
};
|
||||||
var handler7 = function divClick1() {
|
const handler7 = function divClick1() {
|
||||||
alert(7);
|
alert(7);
|
||||||
};
|
};
|
||||||
var handler8 = function divClick2() {
|
const handler8 = function divClick2() {
|
||||||
alert(8);
|
alert(8);
|
||||||
};
|
};
|
||||||
var handler9 = function divKeyDown() {
|
const handler9 = function divKeyDown() {
|
||||||
alert(9);
|
alert(9);
|
||||||
};
|
};
|
||||||
var handler10 = function divDragOut() {
|
const handler10 = function divDragOut() {
|
||||||
alert(10);
|
alert(10);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ const TEST_DATA = [
|
||||||
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var div = $("div")[0];
|
const div = $("div")[0];
|
||||||
$(div).click(handler7);
|
$(div).click(handler7);
|
||||||
$(div).click(handler8);
|
$(div).click(handler8);
|
||||||
$(div).keydown(handler9);
|
$(div).keydown(handler9);
|
||||||
|
|
@ -86,7 +86,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":34:41",
|
filename: TEST_URL + ":36:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -97,7 +97,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":35:41",
|
filename: TEST_URL + ":37:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -108,7 +108,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "keydown",
|
type: "keydown",
|
||||||
filename: TEST_URL + ":36:42",
|
filename: TEST_URL + ":38:44",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -125,7 +125,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "dragend",
|
type: "dragend",
|
||||||
filename: TEST_URL + ":31:46",
|
filename: TEST_URL + ":33:48",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -137,7 +137,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragleave",
|
type: "dragleave",
|
||||||
filename: TEST_URL + ":30:48",
|
filename: TEST_URL + ":32:50",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -149,7 +149,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragover",
|
type: "dragover",
|
||||||
filename: TEST_URL + ":33:47",
|
filename: TEST_URL + ":35:49",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -161,7 +161,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "drop",
|
type: "drop",
|
||||||
filename: TEST_URL + ":32:43",
|
filename: TEST_URL + ":34:45",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
|
||||||
|
|
@ -18,41 +18,41 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "load",
|
type: "load",
|
||||||
filename: TEST_URL + ":27:38",
|
filename: TEST_URL + ":29:38",
|
||||||
attributes: [
|
attributes: [
|
||||||
"Bubbling",
|
"Bubbling",
|
||||||
"DOM2"
|
"DOM2"
|
||||||
],
|
],
|
||||||
handler: `
|
handler: `
|
||||||
() => {
|
() => {
|
||||||
var handler1 = function liveDivDblClick() {
|
const handler1 = function liveDivDblClick() {
|
||||||
alert(1);
|
alert(1);
|
||||||
};
|
};
|
||||||
var handler2 = function liveDivDragStart() {
|
const handler2 = function liveDivDragStart() {
|
||||||
alert(2);
|
alert(2);
|
||||||
};
|
};
|
||||||
var handler3 = function liveDivDragLeave() {
|
const handler3 = function liveDivDragLeave() {
|
||||||
alert(3);
|
alert(3);
|
||||||
};
|
};
|
||||||
var handler4 = function liveDivDragEnd() {
|
const handler4 = function liveDivDragEnd() {
|
||||||
alert(4);
|
alert(4);
|
||||||
};
|
};
|
||||||
var handler5 = function liveDivDrop() {
|
const handler5 = function liveDivDrop() {
|
||||||
alert(5);
|
alert(5);
|
||||||
};
|
};
|
||||||
var handler6 = function liveDivDragOver() {
|
const handler6 = function liveDivDragOver() {
|
||||||
alert(6);
|
alert(6);
|
||||||
};
|
};
|
||||||
var handler7 = function divClick1() {
|
const handler7 = function divClick1() {
|
||||||
alert(7);
|
alert(7);
|
||||||
};
|
};
|
||||||
var handler8 = function divClick2() {
|
const handler8 = function divClick2() {
|
||||||
alert(8);
|
alert(8);
|
||||||
};
|
};
|
||||||
var handler9 = function divKeyDown() {
|
const handler9 = function divKeyDown() {
|
||||||
alert(9);
|
alert(9);
|
||||||
};
|
};
|
||||||
var handler10 = function divDragOut() {
|
const handler10 = function divDragOut() {
|
||||||
alert(10);
|
alert(10);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ const TEST_DATA = [
|
||||||
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var div = $("div")[0];
|
const div = $("div")[0];
|
||||||
$(div).click(handler7);
|
$(div).click(handler7);
|
||||||
$(div).click(handler8);
|
$(div).click(handler8);
|
||||||
$(div).keydown(handler9);
|
$(div).keydown(handler9);
|
||||||
|
|
@ -85,7 +85,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":34:41",
|
filename: TEST_URL + ":36:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -96,7 +96,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":35:41",
|
filename: TEST_URL + ":37:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -122,7 +122,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "keydown",
|
type: "keydown",
|
||||||
filename: TEST_URL + ":36:42",
|
filename: TEST_URL + ":38:44",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -31,41 +31,41 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "load",
|
type: "load",
|
||||||
filename: TEST_URL + ":27:38",
|
filename: TEST_URL + ":29:38",
|
||||||
attributes: [
|
attributes: [
|
||||||
"Bubbling",
|
"Bubbling",
|
||||||
"DOM2"
|
"DOM2"
|
||||||
],
|
],
|
||||||
handler: `
|
handler: `
|
||||||
() => {
|
() => {
|
||||||
var handler1 = function liveDivDblClick() {
|
const handler1 = function liveDivDblClick() {
|
||||||
alert(1);
|
alert(1);
|
||||||
};
|
};
|
||||||
var handler2 = function liveDivDragStart() {
|
const handler2 = function liveDivDragStart() {
|
||||||
alert(2);
|
alert(2);
|
||||||
};
|
};
|
||||||
var handler3 = function liveDivDragLeave() {
|
const handler3 = function liveDivDragLeave() {
|
||||||
alert(3);
|
alert(3);
|
||||||
};
|
};
|
||||||
var handler4 = function liveDivDragEnd() {
|
const handler4 = function liveDivDragEnd() {
|
||||||
alert(4);
|
alert(4);
|
||||||
};
|
};
|
||||||
var handler5 = function liveDivDrop() {
|
const handler5 = function liveDivDrop() {
|
||||||
alert(5);
|
alert(5);
|
||||||
};
|
};
|
||||||
var handler6 = function liveDivDragOver() {
|
const handler6 = function liveDivDragOver() {
|
||||||
alert(6);
|
alert(6);
|
||||||
};
|
};
|
||||||
var handler7 = function divClick1() {
|
const handler7 = function divClick1() {
|
||||||
alert(7);
|
alert(7);
|
||||||
};
|
};
|
||||||
var handler8 = function divClick2() {
|
const handler8 = function divClick2() {
|
||||||
alert(8);
|
alert(8);
|
||||||
};
|
};
|
||||||
var handler9 = function divKeyDown() {
|
const handler9 = function divKeyDown() {
|
||||||
alert(9);
|
alert(9);
|
||||||
};
|
};
|
||||||
var handler10 = function divDragOut() {
|
const handler10 = function divDragOut() {
|
||||||
alert(10);
|
alert(10);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -85,7 +85,7 @@ const TEST_DATA = [
|
||||||
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var div = $("div")[0];
|
const div = $("div")[0];
|
||||||
$(div).click(handler7);
|
$(div).click(handler7);
|
||||||
$(div).click(handler8);
|
$(div).click(handler8);
|
||||||
$(div).keydown(handler9);
|
$(div).keydown(handler9);
|
||||||
|
|
@ -98,7 +98,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":34:41",
|
filename: TEST_URL + ":36:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -109,7 +109,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":35:41",
|
filename: TEST_URL + ":37:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -120,7 +120,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "keydown",
|
type: "keydown",
|
||||||
filename: TEST_URL + ":36:42",
|
filename: TEST_URL + ":38:44",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -136,7 +136,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "dblclick",
|
type: "dblclick",
|
||||||
filename: TEST_URL + ":28:47",
|
filename: TEST_URL + ":30:49",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -148,7 +148,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragstart",
|
type: "dragstart",
|
||||||
filename: TEST_URL + ":29:48",
|
filename: TEST_URL + ":31:50",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
|
||||||
|
|
@ -31,41 +31,41 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "load",
|
type: "load",
|
||||||
filename: TEST_URL + ":27:38",
|
filename: TEST_URL + ":29:38",
|
||||||
attributes: [
|
attributes: [
|
||||||
"Bubbling",
|
"Bubbling",
|
||||||
"DOM2"
|
"DOM2"
|
||||||
],
|
],
|
||||||
handler: `
|
handler: `
|
||||||
() => {
|
() => {
|
||||||
var handler1 = function liveDivDblClick() {
|
const handler1 = function liveDivDblClick() {
|
||||||
alert(1);
|
alert(1);
|
||||||
};
|
};
|
||||||
var handler2 = function liveDivDragStart() {
|
const handler2 = function liveDivDragStart() {
|
||||||
alert(2);
|
alert(2);
|
||||||
};
|
};
|
||||||
var handler3 = function liveDivDragLeave() {
|
const handler3 = function liveDivDragLeave() {
|
||||||
alert(3);
|
alert(3);
|
||||||
};
|
};
|
||||||
var handler4 = function liveDivDragEnd() {
|
const handler4 = function liveDivDragEnd() {
|
||||||
alert(4);
|
alert(4);
|
||||||
};
|
};
|
||||||
var handler5 = function liveDivDrop() {
|
const handler5 = function liveDivDrop() {
|
||||||
alert(5);
|
alert(5);
|
||||||
};
|
};
|
||||||
var handler6 = function liveDivDragOver() {
|
const handler6 = function liveDivDragOver() {
|
||||||
alert(6);
|
alert(6);
|
||||||
};
|
};
|
||||||
var handler7 = function divClick1() {
|
const handler7 = function divClick1() {
|
||||||
alert(7);
|
alert(7);
|
||||||
};
|
};
|
||||||
var handler8 = function divClick2() {
|
const handler8 = function divClick2() {
|
||||||
alert(8);
|
alert(8);
|
||||||
};
|
};
|
||||||
var handler9 = function divKeyDown() {
|
const handler9 = function divKeyDown() {
|
||||||
alert(9);
|
alert(9);
|
||||||
};
|
};
|
||||||
var handler10 = function divDragOut() {
|
const handler10 = function divDragOut() {
|
||||||
alert(10);
|
alert(10);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -85,7 +85,7 @@ const TEST_DATA = [
|
||||||
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var div = $("div")[0];
|
const div = $("div")[0];
|
||||||
$(div).click(handler7);
|
$(div).click(handler7);
|
||||||
$(div).click(handler8);
|
$(div).click(handler8);
|
||||||
$(div).keydown(handler9);
|
$(div).keydown(handler9);
|
||||||
|
|
@ -118,7 +118,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":34:41",
|
filename: TEST_URL + ":36:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -129,7 +129,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":35:41",
|
filename: TEST_URL + ":37:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -140,7 +140,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "keydown",
|
type: "keydown",
|
||||||
filename: TEST_URL + ":36:42",
|
filename: TEST_URL + ":38:44",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -156,7 +156,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "dblclick",
|
type: "dblclick",
|
||||||
filename: TEST_URL + ":28:47",
|
filename: TEST_URL + ":30:49",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -180,7 +180,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragstart",
|
type: "dragstart",
|
||||||
filename: TEST_URL + ":29:48",
|
filename: TEST_URL + ":31:50",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
|
||||||
|
|
@ -32,41 +32,41 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "load",
|
type: "load",
|
||||||
filename: TEST_URL + ":27:38",
|
filename: TEST_URL + ":29:38",
|
||||||
attributes: [
|
attributes: [
|
||||||
"Bubbling",
|
"Bubbling",
|
||||||
"DOM2"
|
"DOM2"
|
||||||
],
|
],
|
||||||
handler: `
|
handler: `
|
||||||
() => {
|
() => {
|
||||||
var handler1 = function liveDivDblClick() {
|
const handler1 = function liveDivDblClick() {
|
||||||
alert(1);
|
alert(1);
|
||||||
};
|
};
|
||||||
var handler2 = function liveDivDragStart() {
|
const handler2 = function liveDivDragStart() {
|
||||||
alert(2);
|
alert(2);
|
||||||
};
|
};
|
||||||
var handler3 = function liveDivDragLeave() {
|
const handler3 = function liveDivDragLeave() {
|
||||||
alert(3);
|
alert(3);
|
||||||
};
|
};
|
||||||
var handler4 = function liveDivDragEnd() {
|
const handler4 = function liveDivDragEnd() {
|
||||||
alert(4);
|
alert(4);
|
||||||
};
|
};
|
||||||
var handler5 = function liveDivDrop() {
|
const handler5 = function liveDivDrop() {
|
||||||
alert(5);
|
alert(5);
|
||||||
};
|
};
|
||||||
var handler6 = function liveDivDragOver() {
|
const handler6 = function liveDivDragOver() {
|
||||||
alert(6);
|
alert(6);
|
||||||
};
|
};
|
||||||
var handler7 = function divClick1() {
|
const handler7 = function divClick1() {
|
||||||
alert(7);
|
alert(7);
|
||||||
};
|
};
|
||||||
var handler8 = function divClick2() {
|
const handler8 = function divClick2() {
|
||||||
alert(8);
|
alert(8);
|
||||||
};
|
};
|
||||||
var handler9 = function divKeyDown() {
|
const handler9 = function divKeyDown() {
|
||||||
alert(9);
|
alert(9);
|
||||||
};
|
};
|
||||||
var handler10 = function divDragOut() {
|
const handler10 = function divDragOut() {
|
||||||
alert(10);
|
alert(10);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ const TEST_DATA = [
|
||||||
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var div = $("div")[0];
|
const div = $("div")[0];
|
||||||
$(div).click(handler7);
|
$(div).click(handler7);
|
||||||
$(div).click(handler8);
|
$(div).click(handler8);
|
||||||
$(div).keydown(handler9);
|
$(div).keydown(handler9);
|
||||||
|
|
@ -116,7 +116,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":34:41",
|
filename: TEST_URL + ":36:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -127,7 +127,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":35:41",
|
filename: TEST_URL + ":37:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -138,7 +138,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "keydown",
|
type: "keydown",
|
||||||
filename: TEST_URL + ":36:42",
|
filename: TEST_URL + ":38:44",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -154,7 +154,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "dblclick",
|
type: "dblclick",
|
||||||
filename: TEST_URL + ":28:47",
|
filename: TEST_URL + ":30:49",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -211,7 +211,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragend",
|
type: "dragend",
|
||||||
filename: TEST_URL + ":31:46",
|
filename: TEST_URL + ":33:48",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -268,7 +268,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragleave",
|
type: "dragleave",
|
||||||
filename: TEST_URL + ":30:48",
|
filename: TEST_URL + ":32:50",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -325,7 +325,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragstart",
|
type: "dragstart",
|
||||||
filename: TEST_URL + ":29:48",
|
filename: TEST_URL + ":31:50",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
|
||||||
|
|
@ -32,41 +32,41 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "load",
|
type: "load",
|
||||||
filename: TEST_URL + ":27:38",
|
filename: TEST_URL + ":29:38",
|
||||||
attributes: [
|
attributes: [
|
||||||
"Bubbling",
|
"Bubbling",
|
||||||
"DOM2"
|
"DOM2"
|
||||||
],
|
],
|
||||||
handler: `
|
handler: `
|
||||||
() => {
|
() => {
|
||||||
var handler1 = function liveDivDblClick() {
|
const handler1 = function liveDivDblClick() {
|
||||||
alert(1);
|
alert(1);
|
||||||
};
|
};
|
||||||
var handler2 = function liveDivDragStart() {
|
const handler2 = function liveDivDragStart() {
|
||||||
alert(2);
|
alert(2);
|
||||||
};
|
};
|
||||||
var handler3 = function liveDivDragLeave() {
|
const handler3 = function liveDivDragLeave() {
|
||||||
alert(3);
|
alert(3);
|
||||||
};
|
};
|
||||||
var handler4 = function liveDivDragEnd() {
|
const handler4 = function liveDivDragEnd() {
|
||||||
alert(4);
|
alert(4);
|
||||||
};
|
};
|
||||||
var handler5 = function liveDivDrop() {
|
const handler5 = function liveDivDrop() {
|
||||||
alert(5);
|
alert(5);
|
||||||
};
|
};
|
||||||
var handler6 = function liveDivDragOver() {
|
const handler6 = function liveDivDragOver() {
|
||||||
alert(6);
|
alert(6);
|
||||||
};
|
};
|
||||||
var handler7 = function divClick1() {
|
const handler7 = function divClick1() {
|
||||||
alert(7);
|
alert(7);
|
||||||
};
|
};
|
||||||
var handler8 = function divClick2() {
|
const handler8 = function divClick2() {
|
||||||
alert(8);
|
alert(8);
|
||||||
};
|
};
|
||||||
var handler9 = function divKeyDown() {
|
const handler9 = function divKeyDown() {
|
||||||
alert(9);
|
alert(9);
|
||||||
};
|
};
|
||||||
var handler10 = function divDragOut() {
|
const handler10 = function divDragOut() {
|
||||||
alert(10);
|
alert(10);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ const TEST_DATA = [
|
||||||
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var div = $("div")[0];
|
const div = $("div")[0];
|
||||||
$(div).click(handler7);
|
$(div).click(handler7);
|
||||||
$(div).click(handler8);
|
$(div).click(handler8);
|
||||||
$(div).keydown(handler9);
|
$(div).keydown(handler9);
|
||||||
|
|
@ -116,7 +116,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":34:41",
|
filename: TEST_URL + ":36:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -127,7 +127,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":35:41",
|
filename: TEST_URL + ":37:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -138,7 +138,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "keydown",
|
type: "keydown",
|
||||||
filename: TEST_URL + ":36:42",
|
filename: TEST_URL + ":38:44",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -154,7 +154,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "dblclick",
|
type: "dblclick",
|
||||||
filename: TEST_URL + ":28:47",
|
filename: TEST_URL + ":30:49",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -166,7 +166,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragend",
|
type: "dragend",
|
||||||
filename: TEST_URL + ":31:46",
|
filename: TEST_URL + ":33:48",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -178,7 +178,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragleave",
|
type: "dragleave",
|
||||||
filename: TEST_URL + ":30:48",
|
filename: TEST_URL + ":32:50",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -190,7 +190,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragover",
|
type: "dragover",
|
||||||
filename: TEST_URL + ":33:47",
|
filename: TEST_URL + ":35:49",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -202,7 +202,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragstart",
|
type: "dragstart",
|
||||||
filename: TEST_URL + ":29:48",
|
filename: TEST_URL + ":31:50",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -214,7 +214,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "drop",
|
type: "drop",
|
||||||
filename: TEST_URL + ":32:43",
|
filename: TEST_URL + ":34:45",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
|
||||||
|
|
@ -20,41 +20,41 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "load",
|
type: "load",
|
||||||
filename: TEST_URL + ":27:38",
|
filename: TEST_URL + ":29:38",
|
||||||
attributes: [
|
attributes: [
|
||||||
"Bubbling",
|
"Bubbling",
|
||||||
"DOM2"
|
"DOM2"
|
||||||
],
|
],
|
||||||
handler: `
|
handler: `
|
||||||
() => {
|
() => {
|
||||||
var handler1 = function liveDivDblClick() {
|
const handler1 = function liveDivDblClick() {
|
||||||
alert(1);
|
alert(1);
|
||||||
};
|
};
|
||||||
var handler2 = function liveDivDragStart() {
|
const handler2 = function liveDivDragStart() {
|
||||||
alert(2);
|
alert(2);
|
||||||
};
|
};
|
||||||
var handler3 = function liveDivDragLeave() {
|
const handler3 = function liveDivDragLeave() {
|
||||||
alert(3);
|
alert(3);
|
||||||
};
|
};
|
||||||
var handler4 = function liveDivDragEnd() {
|
const handler4 = function liveDivDragEnd() {
|
||||||
alert(4);
|
alert(4);
|
||||||
};
|
};
|
||||||
var handler5 = function liveDivDrop() {
|
const handler5 = function liveDivDrop() {
|
||||||
alert(5);
|
alert(5);
|
||||||
};
|
};
|
||||||
var handler6 = function liveDivDragOver() {
|
const handler6 = function liveDivDragOver() {
|
||||||
alert(6);
|
alert(6);
|
||||||
};
|
};
|
||||||
var handler7 = function divClick1() {
|
const handler7 = function divClick1() {
|
||||||
alert(7);
|
alert(7);
|
||||||
};
|
};
|
||||||
var handler8 = function divClick2() {
|
const handler8 = function divClick2() {
|
||||||
alert(8);
|
alert(8);
|
||||||
};
|
};
|
||||||
var handler9 = function divKeyDown() {
|
const handler9 = function divKeyDown() {
|
||||||
alert(9);
|
alert(9);
|
||||||
};
|
};
|
||||||
var handler10 = function divDragOut() {
|
const handler10 = function divDragOut() {
|
||||||
alert(10);
|
alert(10);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -74,7 +74,7 @@ const TEST_DATA = [
|
||||||
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
$(document).on("dragout", "#livediv:xxxxx", handler10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var div = $("div")[0];
|
const div = $("div")[0];
|
||||||
$(div).click(handler7);
|
$(div).click(handler7);
|
||||||
$(div).click(handler8);
|
$(div).click(handler8);
|
||||||
$(div).keydown(handler9);
|
$(div).keydown(handler9);
|
||||||
|
|
@ -87,7 +87,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":34:41",
|
filename: TEST_URL + ":36:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -98,7 +98,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":35:41",
|
filename: TEST_URL + ":37:43",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -109,7 +109,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "keydown",
|
type: "keydown",
|
||||||
filename: TEST_URL + ":36:42",
|
filename: TEST_URL + ":38:44",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery"
|
"jQuery"
|
||||||
],
|
],
|
||||||
|
|
@ -125,7 +125,7 @@ const TEST_DATA = [
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "dragend",
|
type: "dragend",
|
||||||
filename: TEST_URL + ":31:46",
|
filename: TEST_URL + ":33:48",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -137,7 +137,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragleave",
|
type: "dragleave",
|
||||||
filename: TEST_URL + ":30:48",
|
filename: TEST_URL + ":32:50",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -149,7 +149,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "dragover",
|
type: "dragover",
|
||||||
filename: TEST_URL + ":33:47",
|
filename: TEST_URL + ":35:49",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
@ -161,7 +161,7 @@ const TEST_DATA = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "drop",
|
type: "drop",
|
||||||
filename: TEST_URL + ":32:43",
|
filename: TEST_URL + ":34:45",
|
||||||
attributes: [
|
attributes: [
|
||||||
"jQuery",
|
"jQuery",
|
||||||
"Live"
|
"Live"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":17:23",
|
filename: TEST_URL + ":20:23",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: `() => {\n` + ` console.log("handleEvent");\n` + `}`,
|
handler: `() => {\n` + ` console.log("handleEvent");\n` + `}`,
|
||||||
},
|
},
|
||||||
|
|
@ -29,7 +29,7 @@ const TEST_DATA = [ // eslint-disable-line
|
||||||
expected: [
|
expected: [
|
||||||
{
|
{
|
||||||
type: "click",
|
type: "click",
|
||||||
filename: TEST_URL + ":24:23",
|
filename: TEST_URL + ":27:23",
|
||||||
attributes: ["Bubbling", "DOM2"],
|
attributes: ["Bubbling", "DOM2"],
|
||||||
handler: `() => {\n` + ` console.log("handleEvent");\n` + `}`,
|
handler: `() => {\n` + ` console.log("handleEvent");\n` + `}`,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/* exported init */
|
||||||
function init() {
|
function init() {
|
||||||
const container = document.getElementById("container");
|
const container = document.getElementById("container");
|
||||||
const multiple = document.getElementById("multiple");
|
const multiple = document.getElementById("multiple");
|
||||||
|
|
@ -37,7 +40,7 @@
|
||||||
multiple.addEventListener("click", clickHandler);
|
multiple.addEventListener("click", clickHandler);
|
||||||
multiple.addEventListener("mouseup", mouseupHandler);
|
multiple.addEventListener("mouseup", mouseupHandler);
|
||||||
|
|
||||||
const he = new handleEventClick();
|
const he = new HandleEventClick();
|
||||||
const handleevent = document.getElementById("handleevent");
|
const handleevent = document.getElementById("handleevent");
|
||||||
handleevent.addEventListener("click", he);
|
handleevent.addEventListener("click", he);
|
||||||
}
|
}
|
||||||
|
|
@ -59,11 +62,11 @@
|
||||||
output.textContent = "mouseup";
|
output.textContent = "mouseup";
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleEventClick(hehe) {
|
function HandleEventClick(hehe) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleEventClick.prototype = {
|
HandleEventClick.prototype = {
|
||||||
handleEvent: function(blah) {
|
handleEvent: function(blah) {
|
||||||
alert("handleEvent");
|
alert("handleEvent");
|
||||||
}
|
}
|
||||||
|
|
@ -73,6 +76,7 @@
|
||||||
alert("noevents has an event listener");
|
alert("noevents has an event listener");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* exported addNoeventsClickHandler, removeNoeventsClickHandler */
|
||||||
function addNoeventsClickHandler() {
|
function addNoeventsClickHandler() {
|
||||||
const noevents = document.getElementById("noevents");
|
const noevents = document.getElementById("noevents");
|
||||||
noevents.addEventListener("click", noeventsClickHandler);
|
noevents.addEventListener("click", noeventsClickHandler);
|
||||||
|
|
|
||||||
|
|
@ -17,24 +17,27 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/* exported init */
|
||||||
function init() {
|
function init() {
|
||||||
const fatarrow = document.getElementById("fatarrow");
|
const fatarrow = document.getElementById("fatarrow");
|
||||||
|
|
||||||
const he = new handleEventClick();
|
const he = new HandleEventClick();
|
||||||
const anonObjectMethod = document.getElementById("anon-object-method");
|
const anonObjectMethod = document.getElementById("anon-object-method");
|
||||||
anonObjectMethod.addEventListener("click", he.anonObjectMethod);
|
anonObjectMethod.addEventListener("click", he.anonObjectMethod);
|
||||||
|
|
||||||
const objectMethod = document.getElementById("object-method");
|
const objectMethod = document.getElementById("object-method");
|
||||||
objectMethod.addEventListener("click", he.objectMethod);
|
objectMethod.addEventListener("click", he.objectMethod);
|
||||||
|
|
||||||
const bhe = new boundHandleEventClick();
|
const bhe = new BoundHandleEventClick();
|
||||||
const boundheNode = document.getElementById("boundhe");
|
const boundheNode = document.getElementById("boundhe");
|
||||||
bhe.handleEvent = bhe.handleEvent.bind(bhe);
|
bhe.handleEvent = bhe.handleEvent.bind(bhe);
|
||||||
boundheNode.addEventListener("click", bhe);
|
boundheNode.addEventListener("click", bhe);
|
||||||
|
|
||||||
const boundNode = document.getElementById("bound");
|
const boundNode = document.getElementById("bound");
|
||||||
boundClickHandler = boundClickHandler.bind(this);
|
BoundClickHandler = BoundClickHandler.bind(this);
|
||||||
boundNode.addEventListener("click", boundClickHandler);
|
boundNode.addEventListener("click", BoundClickHandler);
|
||||||
|
|
||||||
fatarrow.addEventListener("click", () => {
|
fatarrow.addEventListener("click", () => {
|
||||||
alert("Fat arrow without params!");
|
alert("Fat arrow without params!");
|
||||||
|
|
@ -59,15 +62,15 @@
|
||||||
.addEventListener("click", functionProceededByStreamingComment);
|
.addEventListener("click", functionProceededByStreamingComment);
|
||||||
}
|
}
|
||||||
|
|
||||||
function boundClickHandler(event) {
|
function BoundClickHandler(event) {
|
||||||
alert("Bound event");
|
alert("Bound event");
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleEventClick(hehe) {
|
function HandleEventClick(hehe) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
handleEventClick.prototype = {
|
HandleEventClick.prototype = {
|
||||||
anonObjectMethod: function() {
|
anonObjectMethod: function() {
|
||||||
alert("obj.anonObjectMethod");
|
alert("obj.anonObjectMethod");
|
||||||
},
|
},
|
||||||
|
|
@ -77,11 +80,11 @@
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
function boundHandleEventClick() {
|
function BoundHandleEventClick() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boundHandleEventClick.prototype = {
|
BoundHandleEventClick.prototype = {
|
||||||
handleEvent: function() {
|
handleEvent: function() {
|
||||||
alert("boundHandleEvent");
|
alert("boundHandleEvent");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const namedFunctionExpression =
|
const namedFunctionExpression =
|
||||||
function foo() {
|
function foo() {
|
||||||
alert("namedFunctionExpression");
|
alert("namedFunctionExpression");
|
||||||
|
|
@ -31,6 +33,7 @@
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
/* exported init */
|
||||||
function init() {
|
function init() {
|
||||||
const em = new Es6Method();
|
const em = new Es6Method();
|
||||||
const es6Method = document.getElementById("es6-method");
|
const es6Method = document.getElementById("es6-method");
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,18 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const constructedFunc = new Function();
|
const constructedFunc = new Function();
|
||||||
|
|
||||||
const constructedFuncWithBodyString =
|
const constructedFuncWithBodyString =
|
||||||
new Function('a', 'b', 'c', 'alert("constructedFuncWithBodyString");');
|
new Function('a', 'b', 'c', 'alert("constructedFuncWithBodyString");');
|
||||||
|
|
||||||
const multipleAssignment = foo = bar = function multi() {
|
const multipleAssignment = function multi() {
|
||||||
alert("multipleAssignment");
|
alert("multipleAssignment");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* exported init */
|
||||||
function init() {
|
function init() {
|
||||||
const constructedFunctionNode =
|
const constructedFunctionNode =
|
||||||
document.getElementById("constructed-function");
|
document.getElementById("constructed-function");
|
||||||
|
|
@ -81,10 +84,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function* generator() {
|
|
||||||
alert("generator");
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body onload="init();">
|
<body onload="init();">
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const jq = document.location.search.substr(1);
|
const jq = document.location.search.substr(1);
|
||||||
|
|
||||||
const script = document.createElement("script");
|
const script = document.createElement("script");
|
||||||
|
|
@ -25,16 +27,16 @@
|
||||||
document.head.appendChild(script);
|
document.head.appendChild(script);
|
||||||
|
|
||||||
window.addEventListener("load", () => {
|
window.addEventListener("load", () => {
|
||||||
var handler1 = function liveDivDblClick() { alert(1); };
|
const handler1 = function liveDivDblClick() { alert(1); };
|
||||||
var handler2 = function liveDivDragStart() { alert(2); };
|
const handler2 = function liveDivDragStart() { alert(2); };
|
||||||
var handler3 = function liveDivDragLeave() { alert(3); };
|
const handler3 = function liveDivDragLeave() { alert(3); };
|
||||||
var handler4 = function liveDivDragEnd() { alert(4); };
|
const handler4 = function liveDivDragEnd() { alert(4); };
|
||||||
var handler5 = function liveDivDrop() { alert(5); };
|
const handler5 = function liveDivDrop() { alert(5); };
|
||||||
var handler6 = function liveDivDragOver() { alert(6); };
|
const handler6 = function liveDivDragOver() { alert(6); };
|
||||||
var handler7 = function divClick1() { alert(7); };
|
const handler7 = function divClick1() { alert(7); };
|
||||||
var handler8 = function divClick2() { alert(8); };
|
const handler8 = function divClick2() { alert(8); };
|
||||||
var handler9 = function divKeyDown() { alert(9); };
|
const handler9 = function divKeyDown() { alert(9); };
|
||||||
var handler10 = function divDragOut() { alert(10); };
|
const handler10 = function divDragOut() { alert(10); };
|
||||||
|
|
||||||
if ($("#livediv").live) {
|
if ($("#livediv").live) {
|
||||||
$("#livediv").live( "dblclick", handler1);
|
$("#livediv").live( "dblclick", handler1);
|
||||||
|
|
@ -52,7 +54,7 @@
|
||||||
$(document).on( "dragout", "#livediv:xxxxx", handler10);
|
$(document).on( "dragout", "#livediv:xxxxx", handler10);
|
||||||
}
|
}
|
||||||
|
|
||||||
var div = $("div")[0];
|
const div = $("div")[0];
|
||||||
$(div).click(handler7);
|
$(div).click(handler7);
|
||||||
$(div).click(handler8);
|
$(div).click(handler8);
|
||||||
$(div).keydown(handler9);
|
$(div).keydown(handler9);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
/* exported init */
|
||||||
function init() {
|
function init() {
|
||||||
const valid = document.querySelector("#valid-object-listener");
|
const valid = document.querySelector("#valid-object-listener");
|
||||||
const validInvalid = document.querySelector("#valid-invalid-object-listeners");
|
const validInvalid = document.querySelector("#valid-invalid-object-listeners");
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
alert("inlineFunction");
|
alert("inlineFunction");
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render() {
|
||||||
return React.createElement(
|
return React.createElement(
|
||||||
"div",
|
"div",
|
||||||
null,
|
null,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
alert("inlineFunction");
|
alert("inlineFunction");
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h3 id="inlinejsx" onClick={this.inlineFunction}>Click for inlineFunction</h3>
|
<h3 id="inlinejsx" onClick={this.inlineFunction}>Click for inlineFunction</h3>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
alert("inlineFunction");
|
alert("inlineFunction");
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render() {
|
||||||
return React.createElement(
|
return React.createElement(
|
||||||
"div",
|
"div",
|
||||||
null,
|
null,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
alert("inlineFunction");
|
alert("inlineFunction");
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function () {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h3 id="inlinejsx" onClick={this.inlineFunction}>Click for inlineFunction</h3>
|
<h3 id="inlinejsx" onClick={this.inlineFunction}>Click for inlineFunction</h3>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ let { require: browserRequire } = BrowserLoader({
|
||||||
baseURI: "resource://devtools/client/performance/",
|
baseURI: "resource://devtools/client/performance/",
|
||||||
window,
|
window,
|
||||||
});
|
});
|
||||||
|
const DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||||
|
|
||||||
const $ = (selector, scope = document) => scope.querySelector(selector);
|
const $ = (selector, scope = document) => scope.querySelector(selector);
|
||||||
const $$ = (selector, scope = document) => scope.querySelectorAll(selector);
|
const $$ = (selector, scope = document) => scope.querySelectorAll(selector);
|
||||||
|
|
|
||||||
|
|
@ -13,15 +13,15 @@ Test the rendering of the JIT Optimizations tree. Tests when jit data has observ
|
||||||
<pre id="test">
|
<pre id="test">
|
||||||
<script src="head.js" type="application/javascript"></script>
|
<script src="head.js" type="application/javascript"></script>
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
"use strict";
|
||||||
|
|
||||||
window.onload = async function () {
|
window.onload = async function () {
|
||||||
try {
|
try {
|
||||||
const ReactDOM = browserRequire("devtools/client/shared/vendor/react-dom");
|
const ReactDOM = browserRequire("devtools/client/shared/vendor/react-dom");
|
||||||
const React = browserRequire("devtools/client/shared/vendor/react");
|
const React = browserRequire("devtools/client/shared/vendor/react");
|
||||||
const JITOptimizations = React.createFactory(browserRequire("devtools/client/performance/components/JITOptimizations"));
|
const JITOptimizations = React.createFactory(browserRequire("devtools/client/performance/components/JITOptimizations"));
|
||||||
ok(JITOptimizations, "Should get JITOptimizations");
|
ok(JITOptimizations, "Should get JITOptimizations");
|
||||||
let opts;
|
const opts = ReactDOM.render(JITOptimizations({
|
||||||
|
|
||||||
opts = ReactDOM.render(JITOptimizations({
|
|
||||||
onViewSourceInDebugger: function(){},
|
onViewSourceInDebugger: function(){},
|
||||||
frameData: {
|
frameData: {
|
||||||
isMetaCategory: false,
|
isMetaCategory: false,
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
<body onload="createCookies()">
|
<body onload="createCookies()">
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
"use strict";
|
"use strict";
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
function createCookies() {
|
function createCookies() {
|
||||||
document.cookie = "name=value1;path=/;";
|
document.cookie = "name=value1;path=/;";
|
||||||
document.cookie = "name=value2;path=/path2/;";
|
document.cookie = "name=value2;path=/path2/;";
|
||||||
|
|
@ -20,7 +21,7 @@ window.removeCookie = function (name) {
|
||||||
window.clearCookies = function () {
|
window.clearCookies = function () {
|
||||||
const cookies = document.cookie;
|
const cookies = document.cookie;
|
||||||
for (const cookie of cookies.split(";")) {
|
for (const cookie of cookies.split(";")) {
|
||||||
removeCookie(cookie.split("=")[0]);
|
window.removeCookie(cookie.split("=")[0]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -33,13 +33,13 @@ const idbGenerator = async function () {
|
||||||
};
|
};
|
||||||
const db = await new Promise(done => {
|
const db = await new Promise(done => {
|
||||||
request.onupgradeneeded = event => {
|
request.onupgradeneeded = event => {
|
||||||
const db = event.target.result;
|
const dbResult = event.target.result;
|
||||||
const store1 = db.createObjectStore("obj1", { keyPath: "id" });
|
const store1 = dbResult.createObjectStore("obj1", { keyPath: "id" });
|
||||||
store1.createIndex("name", "name", { unique: false });
|
store1.createIndex("name", "name", { unique: false });
|
||||||
store1.createIndex("email", "email", { unique: true });
|
store1.createIndex("email", "email", { unique: true });
|
||||||
const store2 = db.createObjectStore("obj2", { keyPath: "id2" });
|
dbResult.createObjectStore("obj2", { keyPath: "id2" });
|
||||||
store1.transaction.oncomplete = () => {
|
store1.transaction.oncomplete = () => {
|
||||||
done(db);
|
done(dbResult);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
@ -71,11 +71,11 @@ const idbGenerator = async function () {
|
||||||
request = indexedDB.open("idb2", 1);
|
request = indexedDB.open("idb2", 1);
|
||||||
const db2 = await new Promise(done => {
|
const db2 = await new Promise(done => {
|
||||||
request.onupgradeneeded = event => {
|
request.onupgradeneeded = event => {
|
||||||
const db2 = event.target.result;
|
const db2Result = event.target.result;
|
||||||
const store3 = db2.createObjectStore("obj3", { keyPath: "id3" });
|
const store3 = db2Result.createObjectStore("obj3", { keyPath: "id3" });
|
||||||
store3.createIndex("name2", "name2", { unique: true });
|
store3.createIndex("name2", "name2", { unique: true });
|
||||||
store3.transaction.oncomplete = () => {
|
store3.transaction.oncomplete = () => {
|
||||||
done(db2);
|
done(db2Result);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -35,13 +35,13 @@ const idbGenerator = async function () {
|
||||||
};
|
};
|
||||||
const db = await new Promise(done => {
|
const db = await new Promise(done => {
|
||||||
request.onupgradeneeded = event => {
|
request.onupgradeneeded = event => {
|
||||||
const db = event.target.result;
|
const dbResult = event.target.result;
|
||||||
const store1 = db.createObjectStore("obj1", { keyPath: "id" });
|
const store1 = dbResult.createObjectStore("obj1", { keyPath: "id" });
|
||||||
store1.createIndex("name", "name", { unique: false });
|
store1.createIndex("name", "name", { unique: false });
|
||||||
store1.createIndex("email", "email", { unique: true });
|
store1.createIndex("email", "email", { unique: true });
|
||||||
const store2 = db.createObjectStore("obj2", { keyPath: "id2" });
|
dbResult.createObjectStore("obj2", { keyPath: "id2" });
|
||||||
store1.transaction.oncomplete = () => {
|
store1.transaction.oncomplete = () => {
|
||||||
done(db);
|
done(dbResult);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
@ -73,11 +73,11 @@ const idbGenerator = async function () {
|
||||||
request = indexedDB.open("idb2", 1);
|
request = indexedDB.open("idb2", 1);
|
||||||
const db2 = await new Promise(done => {
|
const db2 = await new Promise(done => {
|
||||||
request.onupgradeneeded = event => {
|
request.onupgradeneeded = event => {
|
||||||
const db2 = event.target.result;
|
const db2Result = event.target.result;
|
||||||
const store3 = db2.createObjectStore("obj3", { keyPath: "id3" });
|
const store3 = db2Result.createObjectStore("obj3", { keyPath: "id3" });
|
||||||
store3.createIndex("name2", "name2", { unique: true });
|
store3.createIndex("name2", "name2", { unique: true });
|
||||||
store3.transaction.oncomplete = () => {
|
store3.transaction.oncomplete = () => {
|
||||||
done(db2);
|
done(db2Result);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ Iframe for testing multiple host detetion in storage actor
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
"use strict";
|
||||||
document.cookie = "sc1=foobar;";
|
document.cookie = "sc1=foobar;";
|
||||||
localStorage.setItem("iframe-s-ls1", "foobar");
|
localStorage.setItem("iframe-s-ls1", "foobar");
|
||||||
sessionStorage.setItem("iframe-s-ss1", "foobar-2");
|
sessionStorage.setItem("iframe-s-ss1", "foobar-2");
|
||||||
|
|
@ -20,10 +20,10 @@ const idbGenerator = async function () {
|
||||||
};
|
};
|
||||||
const db = await new Promise(done => {
|
const db = await new Promise(done => {
|
||||||
request.onupgradeneeded = event => {
|
request.onupgradeneeded = event => {
|
||||||
const db = event.target.result;
|
const dbResult = event.target.result;
|
||||||
const store1 = db.createObjectStore("obj-s1", { keyPath: "id" });
|
const store1 = dbResult.createObjectStore("obj-s1", { keyPath: "id" });
|
||||||
store1.transaction.oncomplete = () => {
|
store1.transaction.oncomplete = () => {
|
||||||
done(db);
|
done(dbResult);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
@ -44,12 +44,12 @@ const idbGenerator = async function () {
|
||||||
request = indexedDB.open("idb-s2", 1);
|
request = indexedDB.open("idb-s2", 1);
|
||||||
const db2 = await new Promise(done => {
|
const db2 = await new Promise(done => {
|
||||||
request.onupgradeneeded = event => {
|
request.onupgradeneeded = event => {
|
||||||
const db2 = event.target.result;
|
const db2Result = event.target.result;
|
||||||
const store3 =
|
const store3 =
|
||||||
db2.createObjectStore("obj-s2", { keyPath: "id3", autoIncrement: true });
|
db2Result.createObjectStore("obj-s2", { keyPath: "id3", autoIncrement: true });
|
||||||
store3.createIndex("name2", "name2", { unique: true });
|
store3.createIndex("name2", "name2", { unique: true });
|
||||||
store3.transaction.oncomplete = () => {
|
store3.transaction.oncomplete = () => {
|
||||||
done(db2);
|
done(db2Result);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ window.clearLocalAndSessionStores = function() {
|
||||||
window.clearCookies = function() {
|
window.clearCookies = function() {
|
||||||
const cookies = document.cookie;
|
const cookies = document.cookie;
|
||||||
for (const cookie of cookies.split(";")) {
|
for (const cookie of cookies.split(";")) {
|
||||||
removeCookie(cookie.split("=")[0]);
|
window.removeCookie(cookie.split("=")[0]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,10 @@
|
||||||
<p>A test page with nested iframes</p>
|
<p>A test page with nested iframes</p>
|
||||||
<iframe></iframe>
|
<iframe></iframe>
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
|
"use strict";
|
||||||
|
|
||||||
const iframe = document.querySelector("iframe");
|
const iframe = document.querySelector("iframe");
|
||||||
let i = parseInt(location.href.split("?")[1]) || 1;
|
let i = parseInt(location.href.split("?")[1], 10) || 1;
|
||||||
|
|
||||||
// The frame can't have the same src URL as any of its ancestors.
|
// The frame can't have the same src URL as any of its ancestors.
|
||||||
// This will not infinitely recurse because a frame won't get a content
|
// This will not infinitely recurse because a frame won't get a content
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue