Skip to content

window.devicePixelRatio#42

Open
toastal wants to merge 1 commit into
purescript-web:masterfrom
growthagent:devicepixelratio
Open

window.devicePixelRatio#42
toastal wants to merge 1 commit into
purescript-web:masterfrom
growthagent:devicepixelratio

Conversation

@toastal

@toastal toastal commented Dec 7, 2020

Copy link
Copy Markdown
Contributor

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??

@thomashoneyman thomashoneyman left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

garyb commented Dec 10, 2020

Copy link
Copy Markdown
Member

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

toastal commented Dec 12, 2020

Copy link
Copy Markdown
Contributor Author

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