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