@next-core/brick-kit 2.183.2 → 2.184.1

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.
@@ -6248,7 +6248,8 @@
6248
6248
  case "legacy.go":
6249
6249
  return builtinIframeListenerFactory(handler.args, handler, context, runtimeBrick);
6250
6250
  case "window.open":
6251
- return builtinWindowListenerFactory(handler.args, handler, context, runtimeBrick);
6251
+ case "window.close":
6252
+ return builtinWindowListenerFactory(method, handler.args, handler, context, runtimeBrick);
6252
6253
  case "location.reload":
6253
6254
  case "location.assign":
6254
6255
  return builtinLocationListenerFactory(method, handler.args, handler, context, runtimeBrick);
@@ -6562,15 +6563,20 @@
6562
6563
  postMessage(url);
6563
6564
  };
6564
6565
  }
6565
- function builtinWindowListenerFactory(args, ifContainer, context, runtimeBrick) {
6566
+ function builtinWindowListenerFactory(method, args, ifContainer, context, runtimeBrick) {
6566
6567
  return function (event) {
6567
6568
  if (!looseCheckIf(ifContainer, _objectSpread__default["default"](_objectSpread__default["default"]({}, context), {}, {
6568
6569
  event
6569
6570
  }), runtimeBrick)) {
6570
6571
  return;
6571
6572
  }
6572
- var [url, target, features] = argsFactory(args, context, event);
6573
- window.open(url, target || "_self", features);
6573
+ if (method === "open") {
6574
+ var [url, target, features] = argsFactory(args, context, event);
6575
+ window.open(url, target || "_self", features);
6576
+ }
6577
+ if (method === "close") {
6578
+ window.close();
6579
+ }
6574
6580
  };
6575
6581
  }
6576
6582
  function builtinAnalyticsListenerFactory(args, ifContainer, context, runtimeBrick) {