How to read page cookie, session and local storage in bex mode?



  • Hi All,
    I am new to Quasar and trying to access page cookie, session and local storage in the bex mode as popup action. I understand it involves using content-hook or dom-hook but not very clear on overall mechanics.

    When the user clicks the extension icon to open the popup, I would like to parse the page application data. I can think of using the mounted/created hook to trigger a bex event and use the content hook script to handle it. Appreciate ideas or inputs.


  • Admin

    As you say, trigger a BEX event from the Quasar side and listen for it in the background hooks file.

    The cookies API is here: https://developer.chrome.com/extensions/cookies so just access that from the background hook. Look at the docs for returning data from an event in a promise based way.


Log in to reply