Added support and info for custom formatters in Firefox by SebastianZ · Pull Request #72 · binaryage/cljs-devtools · GitHub
Skip to content

Added support and info for custom formatters in Firefox#72

Merged
darwin merged 2 commits into
binaryage:masterfrom
SebastianZ:firefox-support
Feb 19, 2023
Merged

Added support and info for custom formatters in Firefox#72
darwin merged 2 commits into
binaryage:masterfrom
SebastianZ:firefox-support

Conversation

@SebastianZ

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

@danielcompton danielcompton left a comment

Copy link
Copy Markdown
Collaborator

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 thread src/lib/devtools/formatters.cljs Outdated
Comment on lines +15 to +18

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

@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