|
Posted by ^reaper^ on 07/11/05 06:36
While sipping absinthe, Richard Cornford heard a loud sucking noise coming
from alt.2600, and hastily inscribed the following unintelligible Sanskrit
in <news:das3a3$hmf$1$8302bc10@news.demon.co.uk>:
> ^reaper^ wrote:
>> Michael Winter wrote:
> <snip>
>> ... . The primary question is, does the browser support it?
>> So, for example, the *only* place I use eval is in this
>> snippet from an old js file.
>>
>> if( document.getElementById )return
>> document.getElementById(name).style;
>> else if( document.links)
>> return document.links[name].style;
>> else if( document.all )
>> return eval('document.all.'+name+'.style');
>
> return document.all[name].style;
>
> Bracket notation property accessors are a fundamental part of javascript
> (ECMA 262, 3rd edition: Section 11.2.1), so if they are not supported
> the environment is not javascript. On the other hand the eval function
> is specifically marked as optional in ECMA 327 (ECMAScript "Compact
> Profile") so it does not have to be implemented on PDA and embedded
> browsers. Indeed the AvantGo browse did not have an eval function (nor
> did it implement the Function constructor).
>
> However, that is an old browser and the recent scriptable PDA and
> embedded browsers seem to be using full ECMA 262 implementations. It
> seems that the resources available on small devices increased at such a
> rate that the ECMAScript compact profile became redundant before anyone
> had a chance to create more than a couple of implementations. Still, the
> theory is that bracket notation property accessors should be better
> supported than the eval function, and that is true in reality, but only
> by a tiny (and no longer relevant) margin.
Here's what diffs peeps like me (serverside) from peeps like you (ui). I
tend to focus on backend functionality, while spending very little time on
teh presentation layer. So my pages/sites generally look like chit, while
teh underlying app is a sight to behold (though some might argue a rather
ugly sight). Or put another way, I know just enuf about teh presentation
layer to be dan^H^H^H to get teh job done. But that's about it. ^_~
--
"I haven't lost my mind, it's backed up on disk somewhere." -- Sycho,
Usenet
[Back to original message]
|