小编Nee*_*enu的帖子

未捕获的DOMException:无法在“窗口”上执行“ postMessage”

我出错了

content-script.js:24 Uncaught (in promise) DOMException: Failed to execute 'postMessage' on 'Window': An object could not be cloned.
    at Object.t.messageJumpContext (chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/content-script.js:24:9921)
    at chrome-extension://elgalmkoelokbchhkhacckoklkejnhcd/build/content-script.js:24:8583
Run Code Online (Sandbox Code Playgroud)

我在代码中的任何地方都没有使用window.postMessage。知道为什么会这样吗?

postmessage window angular

13
推荐指数
1
解决办法
2559
查看次数

angular/cdk 简单拖动不适用于带有 ngFor 的 div

我需要使用 angular-cdk 制作可拖动的项目。我已经在 app 模块中导入了 DragDropModule。我正在 ngFor 中应用 cdkDrag。

<div *ngIf="messages.length" >
    <div
      *ngFor="let message of messages" cdkDrag>
      <strong>{{ message }}</strong>
    </div>
  </div>
Run Code Online (Sandbox Code Playgroud)

拖动没有按预期工作,控制台中也没有出现错误。拖动功能适用于普通 div 元素。

drag-and-drop drag ngfor angular angular-cdk

2
推荐指数
2
解决办法
9116
查看次数

标签 统计

angular ×2

angular-cdk ×1

drag ×1

drag-and-drop ×1

ngfor ×1

postmessage ×1

window ×1