Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PageDimension metric #3

Open
fbuchinger opened this issue Jan 29, 2017 · 1 comment
Open

PageDimension metric #3

fbuchinger opened this issue Jan 29, 2017 · 1 comment

Comments

@fbuchinger
Copy link
Owner

fbuchinger commented Jan 29, 2017

pageHeight: height of the page in pixels including scroll area (i.e. document.body.scrollHeight)
pageWidth: actual width of page content (idea: change window width and see if pageHeight changes
pageSize: pageHeight*pageWidth -> size in megapixels

@fbuchinger
Copy link
Owner Author

Two remarks:

  • should it really be called "pageDimension" or better "blockDimension"? (layoutstats might be invoked on a grandchild of document.body, then it wouldn't measure scrollHeight of that element but not of the whole page)
  • pageWidth could be calculated by using the text node bounding boxes mentioned in font metrics should consider text node area instead of character count #10 (page width ~ bbox(maxRight) - bbox(minLeft))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant