@whitesev/domutils 1.8.5 → 1.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.amd.js CHANGED
@@ -517,7 +517,7 @@ define((function () { 'use strict';
517
517
  },
518
518
  };
519
519
 
520
- const version = "1.8.5";
520
+ const version = "1.8.7";
521
521
 
522
522
  class ElementSelector {
523
523
  windowApi;
@@ -1068,7 +1068,7 @@ define((function () { 'use strict';
1068
1068
  // 超时时间
1069
1069
  let timeout = 0;
1070
1070
  if (typeof args[0] !== "string" && !Array.isArray(args[0]) && typeof args[0] !== "function") {
1071
- throw new TypeError("Utils.waitNode 第一个参数必须是string|string[]|Function");
1071
+ throw new TypeError("DOMUtils.waitNode 第一个参数必须是string|string[]|Function");
1072
1072
  }
1073
1073
  if (args.length === 1) ;
1074
1074
  else if (args.length === 2) {
@@ -1082,7 +1082,7 @@ define((function () { 'use strict';
1082
1082
  parent = secondParam;
1083
1083
  }
1084
1084
  else {
1085
- throw new TypeError("Utils.waitNode 第二个参数必须是number|Node");
1085
+ throw new TypeError("DOMUtils.waitNode 第二个参数必须是number|Node");
1086
1086
  }
1087
1087
  }
1088
1088
  else if (args.length === 3) {
@@ -1097,15 +1097,15 @@ define((function () { 'use strict';
1097
1097
  timeout = thirdParam;
1098
1098
  }
1099
1099
  else {
1100
- throw new TypeError("Utils.waitNode 第三个参数必须是number");
1100
+ throw new TypeError("DOMUtils.waitNode 第三个参数必须是number");
1101
1101
  }
1102
1102
  }
1103
1103
  else {
1104
- throw new TypeError("Utils.waitNode 第二个参数必须是Node");
1104
+ throw new TypeError("DOMUtils.waitNode 第二个参数必须是Node");
1105
1105
  }
1106
1106
  }
1107
1107
  else {
1108
- throw new TypeError("Utils.waitNode 参数个数错误");
1108
+ throw new TypeError("DOMUtils.waitNode 参数个数错误");
1109
1109
  }
1110
1110
  function getNode() {
1111
1111
  if (Array.isArray(selector)) {
@@ -1154,7 +1154,7 @@ define((function () { 'use strict';
1154
1154
  // 超时时间
1155
1155
  let timeout = 0;
1156
1156
  if (typeof args[0] !== "object" && !Array.isArray(args[0])) {
1157
- throw new TypeError("Utils.waitAnyNode 第一个参数必须是string[]");
1157
+ throw new TypeError("DOMUtils.waitAnyNode 第一个参数必须是string[]");
1158
1158
  }
1159
1159
  if (args.length === 1) ;
1160
1160
  else if (args.length === 2) {
@@ -1168,7 +1168,7 @@ define((function () { 'use strict';
1168
1168
  parent = secondParam;
1169
1169
  }
1170
1170
  else {
1171
- throw new TypeError("Utils.waitAnyNode 第二个参数必须是number|Node");
1171
+ throw new TypeError("DOMUtils.waitAnyNode 第二个参数必须是number|Node");
1172
1172
  }
1173
1173
  }
1174
1174
  else if (args.length === 3) {
@@ -1183,15 +1183,15 @@ define((function () { 'use strict';
1183
1183
  timeout = thirdParam;
1184
1184
  }
1185
1185
  else {
1186
- throw new TypeError("Utils.waitAnyNode 第三个参数必须是number");
1186
+ throw new TypeError("DOMUtils.waitAnyNode 第三个参数必须是number");
1187
1187
  }
1188
1188
  }
1189
1189
  else {
1190
- throw new TypeError("Utils.waitAnyNode 第二个参数必须是Node");
1190
+ throw new TypeError("DOMUtils.waitAnyNode 第二个参数必须是Node");
1191
1191
  }
1192
1192
  }
1193
1193
  else {
1194
- throw new TypeError("Utils.waitAnyNode 参数个数错误");
1194
+ throw new TypeError("DOMUtils.waitAnyNode 参数个数错误");
1195
1195
  }
1196
1196
  const promiseList = selectorList.map((selector) => {
1197
1197
  return UtilsContext.waitNode(selector, parent, timeout);
@@ -1209,7 +1209,7 @@ define((function () { 'use strict';
1209
1209
  // 超时时间
1210
1210
  let timeout = 0;
1211
1211
  if (typeof args[0] !== "string" && !Array.isArray(args[0])) {
1212
- throw new TypeError("Utils.waitNodeList 第一个参数必须是string|string[]");
1212
+ throw new TypeError("DOMUtils.waitNodeList 第一个参数必须是string|string[]");
1213
1213
  }
1214
1214
  if (args.length === 1) ;
1215
1215
  else if (args.length === 2) {
@@ -1223,7 +1223,7 @@ define((function () { 'use strict';
1223
1223
  parent = secondParam;
1224
1224
  }
1225
1225
  else {
1226
- throw new TypeError("Utils.waitNodeList 第二个参数必须是number|Node");
1226
+ throw new TypeError("DOMUtils.waitNodeList 第二个参数必须是number|Node");
1227
1227
  }
1228
1228
  }
1229
1229
  else if (args.length === 3) {
@@ -1238,15 +1238,15 @@ define((function () { 'use strict';
1238
1238
  timeout = thirdParam;
1239
1239
  }
1240
1240
  else {
1241
- throw new TypeError("Utils.waitNodeList 第三个参数必须是number");
1241
+ throw new TypeError("DOMUtils.waitNodeList 第三个参数必须是number");
1242
1242
  }
1243
1243
  }
1244
1244
  else {
1245
- throw new TypeError("Utils.waitNodeList 第二个参数必须是Node");
1245
+ throw new TypeError("DOMUtils.waitNodeList 第二个参数必须是Node");
1246
1246
  }
1247
1247
  }
1248
1248
  else {
1249
- throw new TypeError("Utils.waitNodeList 参数个数错误");
1249
+ throw new TypeError("DOMUtils.waitNodeList 参数个数错误");
1250
1250
  }
1251
1251
  function getNodeList() {
1252
1252
  if (Array.isArray(selector)) {
@@ -1295,7 +1295,7 @@ define((function () { 'use strict';
1295
1295
  // 超时时间
1296
1296
  let timeout = 0;
1297
1297
  if (!Array.isArray(args[0])) {
1298
- throw new TypeError("Utils.waitAnyNodeList 第一个参数必须是string[]");
1298
+ throw new TypeError("DOMUtils.waitAnyNodeList 第一个参数必须是string[]");
1299
1299
  }
1300
1300
  if (args.length === 1) ;
1301
1301
  else if (args.length === 2) {
@@ -1309,7 +1309,7 @@ define((function () { 'use strict';
1309
1309
  parent = secondParam;
1310
1310
  }
1311
1311
  else {
1312
- throw new TypeError("Utils.waitAnyNodeList 第二个参数必须是number|Node");
1312
+ throw new TypeError("DOMUtils.waitAnyNodeList 第二个参数必须是number|Node");
1313
1313
  }
1314
1314
  }
1315
1315
  else if (args.length === 3) {
@@ -1324,15 +1324,15 @@ define((function () { 'use strict';
1324
1324
  timeout = thirdParam;
1325
1325
  }
1326
1326
  else {
1327
- throw new TypeError("Utils.waitAnyNodeList 第三个参数必须是number");
1327
+ throw new TypeError("DOMUtils.waitAnyNodeList 第三个参数必须是number");
1328
1328
  }
1329
1329
  }
1330
1330
  else {
1331
- throw new TypeError("Utils.waitAnyNodeList 第二个参数必须是Node");
1331
+ throw new TypeError("DOMUtils.waitAnyNodeList 第二个参数必须是Node");
1332
1332
  }
1333
1333
  }
1334
1334
  else {
1335
- throw new TypeError("Utils.waitAnyNodeList 参数个数错误");
1335
+ throw new TypeError("DOMUtils.waitAnyNodeList 参数个数错误");
1336
1336
  }
1337
1337
  const promiseList = selectorList.map((selector) => {
1338
1338
  return UtilsContext.waitNodeList(selector, parent, timeout);
@@ -4014,7 +4014,7 @@ define((function () { 'use strict';
4014
4014
  checkUserClickInNode($el) {
4015
4015
  const that = this;
4016
4016
  if (!CommonUtils.isDOM($el)) {
4017
- throw new Error("Utils.checkUserClickInNode 参数 targetNode 必须为 Element|Node 类型");
4017
+ throw new Error("DOMUtils.checkUserClickInNode 参数 targetNode 必须为 Element|Node 类型");
4018
4018
  }
4019
4019
  const clickEvent = that.windowApi.window.event;
4020
4020
  const touchEvent = that.windowApi.window.event;