Re: [w3c/webcomponents] Make JavaScript Files a Valid Entry Point to a Web Page (#807)

What's the difference compared to having this file?

```html
<!DOCTYPE html><meta charset="utf-8">
<script>addEventListener('DOMContentLoaded', function () {
  document.title = 'Hello index.js';
  document.head.appendChild(
    document.createElement('style')
  ).textContent = `
    html {
      font-family: sans-serif;
      font-size: 16px;
      text-align: center;
    }
  `;
  document.body.appendChild(
    document.createTextNode('Hello body')
  );
}, {once: true})</script>
```

Also bear in mind with a ServiceWorker you can actually create HTML pages at runtime and serve these on demand, meaning you don't really need more than a SW to have a 100% client side JS based site.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/807#issuecomment-486270580

Received on Wednesday, 24 April 2019 14:40:22 UTC