Question 1: Suppose you have a webpage that contains the following IMG tag.
<img id=”myimage” src=”https://hashtag-labs.com/banner.jpeg” width=”300” height=”250” />
You can assume that any other HTML on this webpage is unknown, but valid.
Write a short script that does the following:
- Every 2 seconds
- If 100% of the image’s pixels are inside the browser viewport