question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optional chaining not supported by UXP/GRE browsers, causing issues

See original GitHub issue

It seems you’ve started using ?. optional chaining (instead of null checking) in ember.js which is causing a lot of problems for UXP/GRE browsers like Pale Moon, Basilisk, Borealis, and various forks. While we are working on implementing this, it’s a fundamental parser change and has proven to be very tricky/elusive to make work. Some high profile websites are now switching to versions of ember.js that use optional chaining (e.g. mewe.com) and this is breaking the web for us.

Could you please consider using normal null checking instead, or providing fallback code that doesn’t use this shorthand?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

10reactions
wolfbeastcommented, Feb 11, 2022

I’m not sure in what way your reply addresses this aside from “Oh we should have thought of that but didn’t”. Are you proposing anything? Is this something that has to be passed up to the transpiler if that’s not your responsibility? Although I’d guess that this comes down to a configuration of the transpiler used, if I look at your “matrix” which isn’t really much of a matrix just what is considered the webkit/blink + gecko pair.

Personal opinion: I’m not entirely certain how this is the responsibility of the framework.

Isn’t is the responsibility of a framework to be browser-agnostic?

Especially if you are looking at the current duoculture of Google and Mozilla (with the latter being fully funded by the former), taking alternative web browser engines into account (small or not) should be important. Just going by “last-1 Chrome, Firefox, Safari” clearly excludes the one main alternative that is left and actively developed. As a framework developer you should be even more responsible because any web compatibility influencing change made in it will impact hundreds or thousands or more websites that rely on a framework.

I suggest you configure your transpiler to continue including internet explorer compatibility if that is the only way in its current form that Pale Moon and other browsers will be supported by the many websites using ember.

4reactions
wolfbeastcommented, Feb 15, 2022

palemoon fully supports es2017, right ? if so, i think that would be a good default preset for babel to support all browser still maintained. it also runs in half of the time as es2015 preset (using node.js) and produces only marginally bigger code than targeting latest ecmascript.

Pale Moon indeed supports all parts of es2017 and es2019 (at least according to kangax tests) and has partial support for es2018 (missing the Google irregex extensions) and es2020 (everything except BigInt, ?. and ??). default preset to es2017 should definitely provide broad coverage of maintained browsers without going into very fine granularity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Optional Chaining Operator, “Modern ... - Jim Nielsen's Blog
This problem started to sound all too familiar: a website that doesn't work across multiple devices. My first thought was, “well it can't...
Read more >
javascript - syntax error while trying to use Optional Chaining (?.)
let's say i'm not sure that i have a ccc key in the object so i want to use Optional Chaining but i'm...
Read more >
Optional chaining operator (`?.`) | Can I use... Support tables ...
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on ... JavaScript operator: Optional chaining operator ( ?...
Read more >
Optional chaining (?.) - JavaScript - MDN Web Docs - Mozilla
By using the ?. operator instead of just . , JavaScript knows to implicitly check to be sure obj.first is not null or...
Read more >
Internet Explorer 11: Bing Maps Website not loaded properly ...
utilDecodeResponse(); if (oSession.utilFindInResponse("LGPopDomains", false)>-1) { // Remove the optional chaining operator which causes the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found