Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stevemao/javascript-cant-replace-html

Things that you can only do with HTML
https://github.com/stevemao/javascript-cant-replace-html

Last synced: 6 days ago
JSON representation

Things that you can only do with HTML

Awesome Lists containing this project

README

        

Since we write a lot of JavaScript now, we tend to write less HTML and css code.

We used to have Ext.js that turns your HTML into something like this:

```html










```

We now have React.js that encourages you to write HTML in your JavaScript. They even build the whole event system. People using JavaScript (EG: form validation) to make sure the HTML has consistent behaviors across different browsers.

It seems like every HTML tag just have some special use agent. For example, an `an` tag is an anchor link. You can click to go to another website. Text is blue with underscore. You could write JavaScript (or/and css) to turn a `

` into ``. Or can you?

*Note:* This list does not include things like calling `createElement()` in your JavaScript, because an `` created by `createElement()` is a real ``.

*Note:* There are other important reasons: semantics, free functionalities, default styles and performance.

## ARIA

No, you can't command your VoiceOver to call a `

` an anchor link. In fact, you can hardly control your VoiceOver in general.

## Context Menu

EG: "Open Link In New Tab". You can't add this to your "right click menu" in JavaScript. No You can't. [You can't even do customize context menu in most browsers](http://caniuse.com/#search=context).

## Search engine

Yes, search engines do run JavaScript now. No they won't treat a `