Skip to content

window.devicePixelRatio #42

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

toastal
Copy link
Contributor

@toastal toastal commented Dec 7, 2020

Prerequisites

  • Before opening a pull request, please check the HTML standard (https://dom.spec.whatwg.org/). If it doesn't appear in this spec, it may be present in the spec for one of the other purescript-web projects. Although MDN is a great resource, it is not a suitable reference for this project.

Description

According to the spec, this, devicePixelRatio, is under CSSOM. There exists a purescript-cssom library, however, other functions like scrollBy, scrollTo, etc. are also listed under CSSOM, but are in the Web.HTML library so I guess this should go here??

Copy link
Contributor

@thomashoneyman thomashoneyman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, this function ought to go in purescript-web-cssom, but given its similarity to scrollX / scrollY and their existence here I think it's acceptable to merge here. We will at some point have to sweep back through the specs to migrate functions appropriately but there's not a concrete timeline for that.

@thomashoneyman
Copy link
Contributor

(That said, given that we're making breaking changes as part of the updates for PureScript 0.14, we may want to go ahead and move other functions like scrollBy over to cssom now, rather than keep the status quo. For example: purescript-web/purescript-web-cssom#5. @garyb?)

@garyb
Copy link
Member

garyb commented Dec 10, 2020

I opened a comment on the cssom repo, it maybe shouldn't belong there either, it's defined in the cssom-view spec: https://www.w3.org/TR/cssom-view-1/#extensions-to-the-window-interface

@toastal
Copy link
Contributor Author

toastal commented Dec 12, 2020

Would there be a downside to have it duplicated in two places? People could possibly be looking for it in either?? I dunno..

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

Successfully merging this pull request may close these issues.

3 participants