diff options
author | Artur <artur@vaadin.com> | 2017-05-09 09:37:14 +0300 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-05-09 09:37:14 +0300 |
commit | 9e44fb6ef71ed45b7aa0e8b358785dd5719787df (patch) | |
tree | ab292fc146b3ed09fce4f8cec6a2fef2aa5cfe57 | |
parent | 87e7887bc02f1e4c7cddbb981d3b042d83e7c41e (diff) | |
download | vaadin-framework-9e44fb6ef71ed45b7aa0e8b358785dd5719787df.tar.gz vaadin-framework-9e44fb6ef71ed45b7aa0e8b358785dd5719787df.zip |
Update ES6 detection logic to match what Polymer is using (#9268)
-rw-r--r-- | shared/src/main/java/com/vaadin/shared/VBrowserDetails.java | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java b/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java index 6933d32326..fdf9b5f723 100644 --- a/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java +++ b/shared/src/main/java/com/vaadin/shared/VBrowserDetails.java @@ -611,21 +611,29 @@ public class VBrowserDetails implements Serializable { * @since 8.1 */ public boolean isEs6Supported() { - if (isTooOldToFunctionProperly()) { - return false; + // Safari 10+ + if (isSafari() && getBrowserMajorVersion() >= 10) { + return true; } - - // assumes evergreen browsers support ES6 - if (isChrome() || isFirefox() || isOpera() || isEdge()) { + // Firefox 51+ + if (isFirefox() && getBrowserMajorVersion() >= 51) { return true; } - - // Safari > 9 - if (isSafari() && getBrowserMajorVersion() > 9) { + // Opera 36+ + if (isOpera() && getBrowserMajorVersion() >= 36) { + return true; + } + // Chrome 49+ + if (isChrome() && getBrowserMajorVersion() >= 49) { + return true; + } + // Edge 15.15063+ + if (isEdge() && (getBrowserMajorVersion() > 15 + || (getBrowserMajorVersion() == 15 + && getBrowserMinorVersion() >= 15063))) { return true; } - // IE11 and Safari 9 return false; } |