Getting cookies in a google chrome extension

后端 未结 2 1069
名媛妹妹
名媛妹妹 2020-12-24 15:04

I am trying to get a cookie specifically from a domain using this code:



        
2条回答
  •  死守一世寂寞
    2020-12-24 15:29

    Any code that depends on the result of the call to chrome.cookies.get() will have to be invoked from within the callback. In your example, just wait for the callback to fire before you show the alert:

    
    

提交回复
热议问题