initCustomEvent pass data for method doesn't work anymore

前端 未结 2 428
忘掉有多难
忘掉有多难 2021-01-29 01:58

I wrote a firefox extension and for interation data between privilege and non-privilege pages I use this snipped code

    //Listen for the event
    window.addE         


        
2条回答
  •  面向向阳花
    2021-01-29 02:22

    You probably have to use __exposedProps__.

    Like

    var detail = {
      name: "activate",
      method: function(){},
      __exposedProps__: {method: "r"}
    };
    

    Needless to say that, unless you are absolutely sure that you know what you 're doing, this is a security risk.

提交回复
热议问题