2
I see this need, that people like me self-taught, try to understand.
The point is - Nowadays some Features are already supported by major browsers HTML5, CSS3, DOM, Apis and Ecmascript... being very used by programmers Javascript, not my case, but you can be one of them. However, I always come across some answer here using them.
There is always a need to transition(transcribe) this functionality(s), to some method flatly compatible. But as always I am an apprentice, today I open an indifferent question of the others made by me.
The idea presented here is to give a list of comparisons of what can be replaced by another native Javascript method, in the absence of browser support.
Example
In HTML 5, we have as native praceholder
to text field. That clears the text defined in value
when focu.
This same effect can be achieved with Javascript pure as follows:
<input value="digite aqui" type="text"
onblur="if(this.value == '') {this.value = 'digite aqui';}"
onfocus="if(this.value == 'digite aqui') {this.value = '';}" />
In short - means to use the method and own properties of the Javascript instead of fancy Apis and such.
I think that, HTML5, CSS3, DOM, Apis and Ecmascript... in a general way would be better applied in a specific project(APP) and/or certain device, type user of Android, Windows Phone or iOS, but not for a whole like the Web, remembering that not all have fast computers and last generation, and over time Firefox, Google Chrome, Opera and Safari among others less, update your Browsers periodically, arriving at a given time that, we have to make a Purchase of a new Micro Computer, because the new actualization can no longer run income on the old PC, sometimes nor install.
As far as it goes, Ngos, not-for-profit entities are unable to buy a new appliance, they survive on donations, correct?
That’s why I’m on set. If I am developing a web project and wish to impact the largest amount of netizens in contact with the site/blog, how will I give up cross browser language. I can’t!
If anyone understood the Question leave your answer or comment.
I may not have understood your question correctly, but I believe that when you have a project to do for some defined entity, you have in hand what can and cannot be done. It all depends on the analysis of requirements and limitations imposed by yourself on your software, particularly on public systems I keep as much compatibility as possible*, but for institutions the system is internal and the company has control of the machines, always do with the most current technology, it is all a matter of analyzing for whom you will develop.
– Renan Cavalieri
I pointed out the question of "maximum compatibility possible*", that is, if even Microsoft does not support older versions of Internet Explorer, why should I? It has to have a balance between that, and optimizing the application will solve various problems for users with slow systems. Some libraries may "solve" compatibility problems with some routines, such as jQuery, but they kill performance, are slow, and in the case of more current browsers, Javascript’s own native code can replace it.
– Renan Cavalieri
@Diegohenriqueguilherme, as I said in my reply, you must use a
Polyfill
, for this case in specific, you can use the following script ES5-DOM-SHIM, then you can use theaddEventListener
andquerySelectorAll
up to IE6– Tobias Mesquita