serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibWeb+LibJS: "supported browser" on GitHub

Open skyrising opened this issue 3 years ago • 5 comments

GitHub checks for a bunch of features to determine if a browser is supported.

You can see these checks yourself at https://github.com/github/browser-support/blob/main/src/index.ts. However this might not exactly match the deployed version, which you can see in browser dev-tools through source maps at assets/node_modules/@github/browser-support/lib/index.js

Base support:

  • [x] Blob: #14563
  • [x] PerformanceObserver: #20760
  • [ ] Intl: #9633
  • [x] MutationObserver: #14559
  • [x] URLSearchParams
  • [x] WebSocket
  • [x] IntersectionObserver: #19860
  • [x] queueMicrotask
  • [x] TextEncoder
  • [x] TextDecoder
  • [x] customElements
  • [x] <details>: #20965
  • [x] AbortController
  • [x] AbortSignal
  • [x] globalThis
  • [x] FormData.prototype.entries
  • [x] Element.prototype.toggleAttribute: #13360
  • [x] Object.fromEntries
  • [x] Array.prototype.flatMap
  • [x] String.prototype.trimEnd
  • [x] Promise.allSettled
  • [x] String.prototype.matchAll
  • [x] String.prototype.replaceAll
  • [x] Promise.any
  • [x] AggregateError
  • [x] Element.prototype.replaceChildren

Polyfilled:

  • [x] AbortSignal.abort: #23279
  • [x] AbortSignal.timeout: #23354
  • [x] Array.prototype.at
  • [x] String.prototype.at
  • [x] TypedArray.prototype.at
  • [x] crypto.randomUuid: #13356
  • [ ] Element.prototype.checkVisibility
  • [x] signal option of EventTarget.prototype.addEventListener
  • [x] HTMLFormElement.prototype.requestSubmit: #23204
  • [x] Object.hasOwn
  • [x] Cooperative Scheduling of Background Tasks: #13413
    • [x] requestIdleCallback
    • [x] cancelIdleCallback
    • [x] IdleDeadline
  • [x] Array.prototype.findLast
  • [x] Array.prototype.findLastIndex

Required features without feature tests:

  • [x] Element.prototype.attachShadow
  • [x] Generator functions
  • [x] fetch: #15795

skyrising avatar Mar 30 '22 13:03 skyrising

True, just at the moment the deployed version checks for it incorrectly. It's fixed in their dev version: https://github.com/github/browser-support/commit/35e239009a974dd64338d88869d4524b9f7aabbc#diff-5777b02de15b15d9086896277beb792f1646303f68d3ddd2d5cfd7ff8418d140L17-R19

skyrising avatar Mar 30 '22 14:03 skyrising

I've implemented enough of custom elements to make GitHub JS progress and it now requires these:

  • Element.attachShadow
Unhandled JavaScript exception: [TypeError] undefined is not a function (evaluated from '<object>.attachShadow')
  o at https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-73b750-38f5b4798267.js:1:20909
  (global execution context) at :0:0
  • Generator functions
Unhandled JavaScript exception: [InternalError] TODO(Generator function execution in AST interpreter is not implemented in LibJS)
  $ at https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_catalyst_lib_index_js-f695bb26145e.js:1:3167
  _ at https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_catalyst_lib_index_js-f695bb26145e.js:1:3168
  C at https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_catalyst_lib_index_js-f695bb26145e.js:1:2472
  O at https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_catalyst_lib_index_js-f695bb26145e.js:1:1834
  connectedCallback at https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_catalyst_lib_index_js-f695bb26145e.js:1:6254
  <unknown> at https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_catalyst_lib_index_js-f695bb26145e.js:1:5701
  (global execution context) at :0:0
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:15705
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:15740
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:15740
  39585 at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:15687
  <unknown> at https://github.githubassets.com/assets/runtime-bdb9fcc41360.js:1:230
  t at https://github.githubassets.com/assets/runtime-bdb9fcc41360.js:1:253
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:98:2164
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:98:3324
  <unknown> at https://github.githubassets.com/assets/runtime-bdb9fcc41360.js:1:622
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:98:3341
  <unknown> at https://github.githubassets.com/assets/runtime-bdb9fcc41360.js:2:250
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:98:2143
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:2
  (global execution context) at :0:0
  • fetch
Unhandled JavaScript exception: [ReferenceError] 'fetch' is not defined
  send at https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_hotkey_dist_index-9f48bd-dd2ca854f808.js:1:5592
  sendEvent at https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_hotkey_dist_index-9f48bd-dd2ca854f808.js:1:5375
  e at https://github.githubassets.com/assets/app_assets_modules_github_behaviors_keyboard-shortcuts-helper_ts-app_assets_modules_github_di-9b8a64-f8d200d587ca.js:1:7881
  data at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:990
  <unknown> at https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-74ce3589143a.js:1:5378
  k at https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-74ce3589143a.js:1:5386
  (global execution context) at :0:0
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:15705
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:15740
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:15740
  39585 at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:15687
  <unknown> at https://github.githubassets.com/assets/runtime-bdb9fcc41360.js:1:230
  t at https://github.githubassets.com/assets/runtime-bdb9fcc41360.js:1:253
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:98:2164
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:98:3324
  <unknown> at https://github.githubassets.com/assets/runtime-bdb9fcc41360.js:1:622
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:98:3341
  <unknown> at https://github.githubassets.com/assets/runtime-bdb9fcc41360.js:2:250
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:98:2143
  <unknown> at https://github.githubassets.com/assets/behaviors-cc157767d2d6.js:1:2
  (global execution context) at :0:0

Lubrsi avatar Jul 23 '22 21:07 Lubrsi

It looks like their base support removed a bunch of pollyfills a few weeks ago. Anyone up for updating the list?

https://github.com/github/browser-support/commit/ee56483410a1b8bedb31940dd8683435aa03eab1

ADKaster avatar Feb 21 '24 19:02 ADKaster

Undocumented, but it now uses the popover(target) attributes, see https://github.com/SerenityOS/serenity/issues/23410

Lubrsi avatar Mar 01 '24 01:03 Lubrsi