0

I just need to get the output for window.scrollY. This is what I've done.

manifest.json

{
    "manifest_version":3,
    "name":"ABCD",
    "version":"1.0",
    "description":"abc",
    "permissions":[
        "activeTab"
    ],
    "action":{
        "default_popup":"popup/popup.html",
        "default_icon":"images/icon.png"
    }
}  

popup.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p>Scroll: </p>
        <p id = 'act'></p>
        <script src='popup2.js'></script>
    </body>
</html>

popup2.js

console.log(window.scrollY);

Console

I'm sure it's a very small issue but I've tried searching everywhere and I still haven't found the solution to my issue.

Even after I've scrolled, I keep getting 0. I need a non-zero value.

wisear51
  • 1
  • 1

0 Answers0