Skip to content

Added support and info for custom formatters in Firefox #72

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

Merged
merged 2 commits into from
Feb 19, 2023

Conversation

SebastianZ
Copy link
Collaborator

As discussed, here are the changes to add support for Firefox. We plan to enable custom formatters in Firefox starting from 110, so I've added that version check.

Please do a quick check and let me know whether the code change is ok.

Unfortunately, I couldn't manage to do re-compilation of the code, so I couldn't properly test it on my side yet.

Sebastian

Copy link
Collaborator

@danielcompton danielcompton left a comment

Choose a reason for hiding this comment

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

I think this looks correct but I'll need to test it out locally to confirm.

It might be even better to do feature detection on the hooks themselves, but that could come later.

Comment on lines 15 to 18
(defn ^:dynamic available? []
(or (in-node-context?) ; node.js or Chrome 47+
(and (isChrome) (isVersionOrHigher 47))))
(and (isAtLeast "CHROMIUM" 47))
(and (isAtLeast "FIREFOX" 110))))
Copy link
Collaborator

Choose a reason for hiding this comment

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

(defn ^:dynamic available? []
  (or (in-node-context?)
      (isAtLeast "CHROMIUM" 47)
      (isAtLeast "EDGE" 79) ;; First Edge to use Blink, has Blink 79.
      (isAtLeast "FIREFOX" 110)))

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done that and added Edge to the documentation. I also updated the Firefox version to 111 because the final parsing of custom formatters didn't land yet.

@SebastianZ
Copy link
Collaborator Author

@danielcompton Could you please do another review? Could you already try it out locally?

Sebastian

@darwin darwin merged commit da96a04 into binaryage:master Feb 19, 2023
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