Skip to content

Suggestions for the 2.0.0 migration guide (as seen in the release notes) #625

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

Closed
yurique opened this issue Nov 9, 2021 · 4 comments
Closed

Comments

@yurique
Copy link

yurique commented Nov 9, 2021

I might be wrong about some of these and would love to be corrected where I got it wrong. (I'm reverse engineering it as I migrate to 2.0.0 and dropping notes here :) ).

  • org.scalajs.dom.ext.EasySeq is gone, use .toSeq on DOMList instead
  • org.scalajs.dom.ext.LocalStorage is gone, use dom.window.localStorage instead
    • org.scalajs.dom.ext.LocalStorage.apply(key) – use Option(dom.window.localStorage.getItem(key))
    • org.scalajs.dom.ext.LocalStorage.apply(key) = newValue – use dom.window.localStorage.setItem(key, newValue)
  • new-based constructor doesn't work for MutationObserverInit – I don't have a workaround, so I just copied the MutationObserverInit.apply into my code (to avoid the deprecation) (Consistently set defaults for new-based constructors #624) see Sébastien's response

(will post comments here if I find more)

@yurique
Copy link
Author

yurique commented Nov 9, 2021

  • org.scalajs.dom.NodeList now takes a type parameter, use NodeList[Node] (is this correct?)

@armanbilge
Copy link
Member

armanbilge commented Nov 9, 2021

@yurique Thanks for this, much appreciated! I created a discussion in #627, would you mind commenting there with your notes/tips and closing this issue? That can be a community-sourced migration guide, I'll link it from the release notes 😁

@yurique
Copy link
Author

yurique commented Nov 9, 2021

@armanbilge awesome idea! Moving things over there.

@yurique
Copy link
Author

yurique commented Nov 9, 2021

Moved to the discussion #627.

@yurique yurique closed this as completed Nov 9, 2021
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

No branches or pull requests

2 participants