Skip to content

Instantly share code, notes, and snippets.

@katai5plate
Last active January 31, 2023 22:18
Show Gist options
  • Save katai5plate/6b1d82a623f193d95de73890e0ea0ea4 to your computer and use it in GitHub Desktop.
Save katai5plate/6b1d82a623f193d95de73890e0ea0ea4 to your computer and use it in GitHub Desktop.
よく使う構文の対応環境一覧

const

{
  "chrome": {
    "version_added": "21"
  },
  "chrome_android": {
    "version_added": "25"
  },
  "edge": {
    "version_added": "12"
  },
  "firefox": {
    "version_added": "36",
    "notes": [
      "Prior to Firefox 13, <code>const</code> is implemented, but re-assignment is not failing.",
      "Prior to Firefox 46, a <code>TypeError</code> was thrown on redeclaration instead of a <code>SyntaxError</code>."
    ]
  },
  "firefox_android": {
    "version_added": "36",
    "notes": [
      "Prior to Firefox 13, <code>const</code> is implemented, but re-assignment is not failing.",
      "Prior to Firefox 46, a <code>TypeError</code> was thrown on redeclaration instead of a <code>SyntaxError</code>."
    ]
  },
  "ie": {
    "version_added": "11"
  },
  "nodejs": {
    "version_added": "6.0.0"
  },
  "opera": {
    "version_added": "9"
  },
  "opera_android": {
    "version_added": "10.1"
  },
  "safari": {
    "version_added": "5.1"
  },
  "safari_ios": {
    "version_added": "6"
  },
  "samsunginternet_android": {
    "version_added": "1.5"
  },
  "webview_android": {
    "version_added": "≤37"
  }
}

let

{
  "chrome": [
    {
      "version_added": "49"
    },
    {
      "version_added": "48",
      "version_removed": "49",
      "flags": [
        {
          "type": "preference",
          "name": "Enable Experimental JavaScript Features"
        }
      ],
      "notes": "Support outside of <a href='https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode'>strict mode</a>."
    },
    {
      "version_added": "41",
      "version_removed": "49",
      "partial_implementation": true,
      "notes": "<a href='https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode'>Strict mode</a> is required."
    }
  ],
  "chrome_android": [
    {
      "version_added": "49"
    },
    {
      "version_added": "48",
      "version_removed": "49",
      "flags": [
        {
          "type": "preference",
          "name": "Enable Experimental JavaScript Features"
        }
      ],
      "notes": "Support outside of <a href='https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode'>strict mode</a>."
    },
    {
      "version_added": "41",
      "version_removed": "49",
      "partial_implementation": true,
      "notes": "<a href='https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode'>Strict mode</a> is required."
    }
  ],
  "edge": [
    {
      "version_added": "14"
    },
    {
      "version_added": "12",
      "version_removed": "14",
      "partial_implementation": true,
      "notes": "In Edge 12 and 13, <code>let</code> within a <code>for</code> loop initializer does not create a separate variable for each loop iteration as defined by ES2015. Instead, it behaves as though the loop were wrapped in a scoping block with the <code>let</code> immediately before the loop."
    }
  ],
  "firefox": {
    "version_added": "44",
    "notes": [
      "Prior to Firefox 44, <code>let</code> is only available to code blocks in HTML wrapped in a <code>&lt;script type=\"application/javascript;version=1.7\"&gt;</code> block (or higher version) and has different semantics (e.g. no temporal dead zone).",
      "Prior to Firefox 46, a <code>TypeError</code> is thrown on redeclaration instead of a <code>SyntaxError</code>.",
      "Firefox 54 adds support of <code>let</code> in workers."
    ]
  },
  "firefox_android": {
    "version_added": "44",
    "notes": [
      "Prior to Firefox 44, <code>let</code> is only available to code blocks in HTML wrapped in a <code>&lt;script type=\"application/javascript;version=1.7\"&gt;</code> block (or higher version) and has different semantics (e.g. no temporal dead zone).",
      "Prior to Firefox 46, a <code>TypeError</code> is thrown on redeclaration instead of a <code>SyntaxError</code>.",
      "Firefox 54 adds support of <code>let</code> in workers."
    ]
  },
  "ie": {
    "version_added": "11",
    "partial_implementation": true,
    "notes": "In Internet Explorer, <code>let</code> within a <code>for</code> loop initializer does not create a separate variable for each loop iteration as defined by ES2015. Instead, it behaves as though the loop were wrapped in a scoping block with the <code>let</code> immediately before the loop."
  },
  "nodejs": {
    "version_added": "6.0.0"
  },
  "opera": {
    "version_added": "17"
  },
  "opera_android": {
    "version_added": "18"
  },
  "safari": {
    "version_added": "10"
  },
  "safari_ios": {
    "version_added": "10"
  },
  "samsunginternet_android": [
    {
      "version_added": "5.0"
    },
    {
      "notes": "<a href='https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode'>Strict mode</a> is required.",
      "partial_implementation": true,
      "version_added": "4.0",
      "version_removed": "5.0"
    }
  ],
  "webview_android": [
    {
      "version_added": "49"
    },
    {
      "version_added": "41",
      "version_removed": "49",
      "partial_implementation": true,
      "notes": "<a href='https://developer.mozilla.org/docs/Web/JavaScript/Reference/Strict_mode'>Strict mode</a> is required."
    }
  ]
}

arrow function

{
  "chrome": {
    "version_added": "45"
  },
  "chrome_android": {
    "version_added": "45"
  },
  "edge": {
    "version_added": "12"
  },
  "firefox": {
    "version_added": "22",
    "notes": [
      "The initial implementation of arrow functions in Firefox made them automatically strict. This has been changed as of Firefox 24. The use of <code>'use strict';</code> is now required.",
      "Prior to Firefox 39, a line terminator (<code>\\n</code>) was incorrectly allowed after arrow function arguments. This has been fixed to conform to the ES2015 specification and code like <code>() \\n => {}</code> will now throw a <code>SyntaxError</code> in this and later versions."
    ]
  },
  "firefox_android": {
    "version_added": "22",
    "notes": [
      "The initial implementation of arrow functions in Firefox made them automatically strict. This has been changed as of Firefox 24. The use of <code>'use strict';</code> is now required.",
      "Prior to Firefox 39, a line terminator (<code>\\n</code>) was incorrectly allowed after arrow function arguments. This has been fixed to conform to the ES2015 specification and code like <code>() \\n => {}</code> will now throw a <code>SyntaxError</code> in this and later versions."
    ]
  },
  "ie": {
    "version_added": false
  },
  "nodejs": {
    "version_added": true
  },
  "opera": {
    "version_added": "32"
  },
  "opera_android": {
    "version_added": "32"
  },
  "safari": {
    "version_added": "10"
  },
  "safari_ios": {
    "version_added": "10"
  },
  "samsunginternet_android": {
    "version_added": "5.0"
  },
  "webview_android": {
    "version_added": "45"
  }
}

promise

{
  "chrome": {
    "version_added": "32"
  },
  "chrome_android": {
    "version_added": "32"
  },
  "edge": {
    "version_added": "12"
  },
  "firefox": {
    "version_added": "29"
  },
  "firefox_android": {
    "version_added": "29"
  },
  "ie": {
    "version_added": false
  },
  "nodejs": {
    "version_added": "0.12"
  },
  "opera": {
    "version_added": "19"
  },
  "opera_android": {
    "version_added": "19"
  },
  "safari": {
    "version_added": "8"
  },
  "safari_ios": {
    "version_added": "8"
  },
  "samsunginternet_android": {
    "version_added": "2.0"
  },
  "webview_android": {
    "version_added": "4.4.3"
  }
}

fetch

{
  "chrome": {
    "version_added": "42"
  },
  "chrome_android": {
    "version_added": "42"
  },
  "edge": {
    "version_added": "14"
  },
  "firefox": [
    {
      "version_added": "39"
    },
    {
      "version_added": "34",
      "flags": [
        {
          "type": "preference",
          "name": "dom.fetch.enable"
        }
      ]
    },
    {
      "version_added": "52",
      "notes": "<code>fetch()</code> now defined on <code><a href='https://developer.mozilla.org/docs/Web/API/WindowOrWorkerGlobalScope'>WindowOrWorkerGlobalScope</a></code> mixin."
    }
  ],
  "firefox_android": [
    {
      "version_added": "39"
    },
    {
      "version_added": "34",
      "flags": [
        {
          "type": "preference",
          "name": "dom.fetch.enable"
        }
      ]
    },
    {
      "version_added": "52",
      "notes": "<code>fetch()</code> now defined on <code><a href='https://developer.mozilla.org/docs/Web/API/WindowOrWorkerGlobalScope'>WindowOrWorkerGlobalScope</a></code> mixin."
    }
  ],
  "ie": {
    "version_added": false
  },
  "opera": [
    {
      "version_added": "29"
    },
    {
      "version_added": "28",
      "flags": [
        {
          "type": "preference",
          "name": "Experimental Web Platform Features"
        }
      ]
    }
  ],
  "opera_android": [
    {
      "version_added": "29"
    },
    {
      "version_added": "28",
      "flags": [
        {
          "type": "preference",
          "name": "Experimental Web Platform Features"
        }
      ]
    }
  ],
  "safari": {
    "version_added": "10.1"
  },
  "safari_ios": {
    "version_added": "10.3"
  },
  "samsunginternet_android": {
    "version_added": "4.0"
  },
  "webview_android": {
    "version_added": "42"
  }
}

async function

{
  "chrome": {
    "version_added": "55"
  },
  "chrome_android": {
    "version_added": "55"
  },
  "edge": {
    "version_added": "15"
  },
  "firefox": {
    "version_added": "52"
  },
  "firefox_android": {
    "version_added": "52"
  },
  "ie": {
    "version_added": false
  },
  "nodejs": [
    {
      "version_added": "7.6.0"
    },
    {
      "version_added": "7.0.0",
      "flags": [
        {
          "type": "runtime_flag",
          "name": "--harmony"
        }
      ]
    }
  ],
  "opera": {
    "version_added": "42"
  },
  "opera_android": {
    "version_added": "42"
  },
  "safari": {
    "version_added": "10.1"
  },
  "safari_ios": {
    "version_added": "10.3"
  },
  "samsunginternet_android": {
    "version_added": "6.0"
  },
  "webview_android": {
    "version_added": "55"
  }
}

await

{
  "chrome": {
    "version_added": "55"
  },
  "chrome_android": {
    "version_added": "55"
  },
  "edge": {
    "version_added": "14"
  },
  "firefox": {
    "version_added": "52"
  },
  "firefox_android": {
    "version_added": "52"
  },
  "ie": {
    "version_added": false
  },
  "nodejs": [
    {
      "version_added": "7.6.0"
    },
    {
      "version_added": "7.0.0",
      "flags": [
        {
          "type": "runtime_flag",
          "name": "--harmony"
        }
      ]
    }
  ],
  "opera": {
    "version_added": "42"
  },
  "opera_android": {
    "version_added": "42"
  },
  "safari": {
    "version_added": "10.1"
  },
  "safari_ios": {
    "version_added": "10.3"
  },
  "samsunginternet_android": {
    "version_added": "6.0"
  },
  "webview_android": {
    "version_added": "55"
  }
}

class

{
  "chrome": [
    {
      "version_added": "49"
    },
    {
      "version_removed": "49",
      "version_added": "42",
      "notes": "Strict mode is required."
    },
    {
      "version_removed": "49",
      "version_added": "42",
      "flags": [
        {
          "type": "preference",
          "name": "Experimental JavaScript",
          "value_to_set": "Enabled"
        }
      ]
    }
  ],
  "chrome_android": [
    {
      "version_added": "49"
    },
    {
      "version_removed": "49",
      "version_added": "42",
      "notes": "Strict mode is required."
    },
    {
      "version_removed": "49",
      "version_added": "42",
      "flags": [
        {
          "type": "preference",
          "name": "Experimental JavaScript",
          "value_to_set": "Enabled"
        }
      ]
    }
  ],
  "edge": {
    "version_added": "13"
  },
  "firefox": {
    "version_added": "45"
  },
  "firefox_android": {
    "version_added": "45"
  },
  "ie": {
    "version_added": false
  },
  "nodejs": [
    {
      "version_added": "6.0.0"
    },
    {
      "version_added": "4.0.0",
      "flags": [
        {
          "type": "runtime_flag",
          "name": "--use_strict"
        }
      ]
    },
    {
      "version_added": "5.0.0",
      "flags": [
        {
          "type": "runtime_flag",
          "name": "--harmony"
        }
      ]
    }
  ],
  "opera": [
    {
      "version_added": "36"
    },
    {
      "version_removed": "36",
      "version_added": "29",
      "notes": "Strict mode is required."
    },
    {
      "version_removed": "36",
      "version_added": "29",
      "flags": [
        {
          "type": "preference",
          "name": "Experimental JavaScript",
          "value_to_set": "Enabled"
        }
      ]
    }
  ],
  "opera_android": [
    {
      "version_added": "36"
    },
    {
      "version_removed": "36",
      "version_added": "29",
      "notes": "Strict mode is required."
    },
    {
      "version_removed": "36",
      "version_added": "29",
      "flags": [
        {
          "type": "preference",
          "name": "Experimental JavaScript",
          "value_to_set": "Enabled"
        }
      ]
    }
  ],
  "safari": {
    "version_added": "9"
  },
  "safari_ios": {
    "version_added": "9"
  },
  "samsunginternet_android": [
    {
      "version_added": "5.0"
    },
    {
      "version_removed": "5.0",
      "version_added": "4.0",
      "notes": "Strict mode is required."
    }
  ],
  "webview_android": [
    {
      "version_added": "49"
    },
    {
      "version_removed": "49",
      "version_added": "42",
      "notes": "Strict mode is required."
    }
  ]
}

class private field

{
  "chrome": {
    "version_added": "74"
  },
  "chrome_android": {
    "version_added": "74"
  },
  "edge": {
    "version_added": "79"
  },
  "firefox": {
    "version_added": false
  },
  "firefox_android": {
    "version_added": false
  },
  "ie": {
    "version_added": false
  },
  "nodejs": {
    "version_added": "12.0.0"
  },
  "opera": {
    "version_added": "62"
  },
  "opera_android": {
    "version_added": "53"
  },
  "safari": {
    "version_added": false
  },
  "safari_ios": {
    "version_added": false
  },
  "samsunginternet_android": {
    "version_added": false
  },
  "webview_android": {
    "version_added": "74"
  }
}

template literal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment