Skip to content

Conversation

@japgolly
Copy link
Contributor

No description provided.

@japgolly
Copy link
Contributor Author

Don't merge yet, this doesn't work properly.

Using this, I get:

Uncaught TypeError: Cannot read property 'previousElementSibling' of null

So... null and undefined aren't the same in Scala.JS?

@sjrd
Copy link
Member

sjrd commented Aug 21, 2015

No, null is null and undefined is () (unit). Imagine how much of everything would make no sense whatsoever if two values that are different in js were "the same" in Scala.js ... I can't even fathom the situation.

@lihaoyi
Copy link
Contributor

lihaoyi commented Aug 21, 2015

Imagine how much of everything would make no sense whatsoever

lol that's just every day in Javascript land...

// Is foo undefined? null? An empty string? 0? who knows!
if (foo){
  ...
}

@japgolly japgolly force-pushed the NonDocumentTypeChildNode branch from ed2704b to 1189eb7 Compare August 21, 2015 05:25
@japgolly
Copy link
Contributor Author

Hehe. Well let's put it down to misremembering and wishful thinking :)

Corrected. Should be good to go now.

@sjrd
Copy link
Member

sjrd commented Aug 21, 2015

LGTM

lol that's just every day in Javascript land...

No no. Your snippet still makes sense. Here we're talking about an entirely different kind of nonsense. The kind which truly has no sense. As opposed to some sense, even if unintuitive and possibly difficult to reason about.

sjrd added a commit that referenced this pull request Aug 21, 2015
@sjrd sjrd merged commit 7554ec6 into scala-js:master Aug 21, 2015
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