From: David Mark on
Michael Haufe ("TNO") wrote:
> On Mar 20, 4:19 am, Andrea Giammarchi <andrea.giammar...(a)gmail.com>
> wrote:
>> by the way, I have just remembered when I was playing with some T-Rex
>> and IE4 I wrote this library which is compatible and normalizes death
>> browsers:http://devpro.it/JSL/
>>
>> If interested, there are few interesting things there, have a look if
>> interested.
>>
>> Regards
>
> From http://devpro.it/JSL/JSLOpenSource.js
> ---------
> if(typeof(XMLHttpRequest)==="undefined"){XMLHttpRequest=function(){
> var tmp=null,elm=navigator.userAgent;
> if(elm.toUpperCase().indexOf("MSIE 4")<0&&window.ActiveXObject)
> tmp=elm.indexOf("MSIE 5")<0?new ActiveXObject("Msxml2.XMLHTTP"):new
> ActiveXObject("Microsoft.XMLHTTP");
> return tmp;
> }};
> ----------
>
> Whats with the sniffing?

Ignorance with a generous helping of incompetence. It started out okay,
but went off the rails on the second line. Searching for (and finding)
userAgent virtually always signals closing the editor and discarding the
script. Granted, the OP didn't say _when_ they wrote this. Hopefully
it was a very long time ago and they have since changed their ways. Or,
on the other hand, perhaps they write scripts for Google, contribute to
Dojo, YUI, etc. It's a crazy world.
From: Thomas 'PointedEars' Lahn on
Asen Bozhilov wrote:

> Thomas 'PointedEars' Lahn wrote:
> > (You are still writing a lot of gibberish.)
>
> You can interpret however you want.

I would not need to interpret your texts if you took more care writing
them.

>> ¹ <http://PointedEars.de/es-matrix>
>
> Why do you group in table unicode escape sequences for string literals
> and regular expression literals? While escape sequences in string
> literals are documented in ECMA-262-1, escape sequences in regular
> expression literals are part of ECMA-262 standard edition 3.

The grouping had already been fixed for the next release (between r9 of
2009-12-19 and r10 of 2010-01-10). I have changed the Edition for "Unicode
escape sequence in RegExp literal" to ES _3_ now (copy-paste error).

> And in table there isn't unicode escape sequences as part of
> IdentifierName, which ECMA-262-3 allow.

Added for the next release.


PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
From: Thomas 'PointedEars' Lahn on
Andrea Giammarchi wrote:

[Context restored]

> [Thomas 'PointedEars' Lahn wrote:]
>> [Asen Bozhilov wrote:]
>>> [...] It's compatible with any ECMA-262 implementations, because
>>> `__proto__` is valid Identifier. Of course Identifiers name like
>>> that aren't good practice. [...]
>> Yes, he got me confused (intentionally?) with the __proto__ argument.
>
> __proto__ property points the inherited prototype

In JavaScript (i.e., in Gecko-based user agents); not in your code.
That is what you have gotten me confused with.

> Since what you want to do is to know if an object inherited from
> Map.prototype, where in Gecko Map.prototype === new Map().__proto__, I
> have used that syntax to explain the concept behind the check.

It is much more likely that you tried to trick me.

> Moreover, the === operator does not tell us if the instance inherits
> from extended prototype, this is why isPrototypeOf is required.
>
> function Map() {}
> function Map2() {}
> Map2.prototype = new Map;
>
> var m = new Map;
> var m2 = new Map2;
>
> m2.__proto__ === Map.prototype; // false
>
> m.__proto__.isPrototypeOf(m2); // true
>
> // ... and ...
> m.__proto__ === Map.prototype; // true
>
> So, how can you get confuse about that variable called __proto__?

(It is a function _argument_, not a variable.) How can you be naming an
function argument like that?

> Finally, which part of an exposed public constructor property unable
> to tell you about inheritance, if any, can be considered more robust?

I have already showed you that the isPrototypeOf() method is not as
compatible as the `constructor' property -- it is unavailable, e.g.,
in JScript 5.0 (IE/MSHTML 5.0). What more there is to know?

> And why are don't you deal with IE3 as well and possibly with a
> browser for Commodore 64?

Argument at ridicule. (There was no JavaScript when Commodore 64 was still
alive.)

Learn to quote: <http://jibbering.com/faq/#posting> pp.


PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)
From: Jorge on
On Mar 20, 12:23 pm, Thomas 'PointedEars' Lahn <PointedE...(a)web.de>
wrote:
> Andrea Giammarchi wrote:
>
> > And why are don't you deal with IE3 as well and possibly with a
> > browser for Commodore 64?
>
> Argument at ridicule.  (There was no JavaScript when Commodore 64 was still
> alive.)

http://58.6.118.18/
--
Jorge.
From: Asen Bozhilov on
Thomas 'PointedEars' Lahn wrote:
> Andrea Giammarchi wrote:

> > So, how can you get confuse about that variable called __proto__?
>
> (It is a function _argument_, not a variable.)  How can you be naming an
> function argument like that?

It can be harmful. Not only confused readers, but can pollute Scope
Chain in strict implementation of ECMA-262-3. If `__proto__` is mimic
of [[Prototype]] property, that can change Prototype Chain of VO. And
during Identifier Resolution will be lookup in Prototype Chain of next
object in Scope Chain. So in theory that property name of VO is
harmful:

var x = true;
(function () {
var __proto__ = {x : false};

print(x); //?
})();

I can't see any implementation there print "false", but in theory can.
So it's depend by implementation of AO/VO and definitely i can't use
Identifiers like this.

1. Confuse readers
2. In some implementations can pollute Scope Chain. Of course that
point is only in theory.






First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12
Prev: how to get url of script
Next: question of logic?