Skip to content

Commit

Permalink
🔥 Remove "No ES6 Features" warning
Browse files Browse the repository at this point in the history
The new build also supports browsers with a shitty JS Engine, so there shouldn't be any problems anymore.
  • Loading branch information
NeoLegends committed Jun 1, 2018
1 parent e5c0137 commit e0f1557
Showing 1 changed file with 5 additions and 43 deletions.
48 changes: 5 additions & 43 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,71 +27,33 @@
margin: 0;
min-height: 100vh;
}

.no-es6 {
color: white;
display: none;
margin: auto;
max-width: 700px;
text-align: center;
}

.no-es6 .flash {
color: yellow;
}

.no-es6 a {
color: white;
}
</style>
</head>
<body>
<app-shell></app-shell>

<div class="no-es6">
<h1><span class="flash">⚡️</span> Oh, no! Unsupported Browser!</h1>
<p>
Seems like you're using an unsupported browser. Please use a modern one to use Festify.
<a href="https://www.google.com/chrome/" alt="Download Google Chrome">Google Chrome</a>,
<a href="https://www.mozilla.org/firefox/" alt="Download Mozilla Firefox">Firefox</a>
or <a href="https://www.apple.com/safari/" alt="Download Safari">Safari</a> are really
good choices. Any other browser that is based on one of them (like Opera) is also going
to work well.
</p>
</div>

<script>
try {
eval('"use strict"; class ES6CompatTestClass {}; const test = () => {}; function* iterator() { yield 1; }');
} catch (e) {
console.error("Your browser doesn't support ES6 classes, ES6 generators or arrow functions (or all of them). Please upgrade to a modern one.");
document.getElementsByClassName('no-es6-class').item(0).style.display = 'block';
document.querySelectorAll('app-shell, .scripts').forEach(node => node.remove());
}
</script>

<!-- Polyfills -->
<script class="scripts" src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"
type="text/javascript">
</script>
<script src="/node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"
type="text/javascript"
nomodule>
</script>
<script src="/node_modules/regenerator-runtime/runtime.js"
type="text/javascript"
class="scripts"
nomodule>
</script>

<!-- ES6 Module Code -->
<script src="/module/index.ts.js" type="module" class="scripts"></script>
<script src="/module/index.ts.js" type="module"></script>

<!-- SystemJS Module Code -->
<script src="/node_modules/systemjs/dist/system-production.js"
type="text/javascript"
class="scripts"
nomodule>
</script>
<script class="scripts" nomodule>
<script type="text/javascript" nomodule>
System.import('/nomodule/index.ts.js');
</script>

Expand Down

0 comments on commit e0f1557

Please sign in to comment.