■スレッドリストへ戻る■ 全部 1- 101- 201- 301- 401- 501- 601- 701- 801- 901- 最新50

read.js 2006ーJavaScriptはCGIの夢を見るか -2-

422 : 株価【1150】 ▲▲ ◆cZfSunOs.U :2006/11/30(木) 23:20:03 ID:/4BTfooo0
やっぱ CGI 版をデフォルトにした方がいいんですかね......
life7 に導入以降 Load Avg. に大きな変化があるわけでもなく,
嫌がる人にまで強制的に使わせなければならない理由は見い出せない上,
JavaScript 版独自の機能は使いたい人だけが使えばいい機能だし.



>>403>>407Safari なら通常は CGI 版に振られるはずですが......

>>409>>415使用ブラウザ等を教えて頂けると参考になります.

>>417その「べき」にはどんな理由があるのでしょうか.ECMA-262 的には

13.2.2 [[Construct]]
    When the [[Construct]] property for a Function object F is called, the following steps are taken:
    1. Create a new native ECMAScript object.
    2. Set the [[Class]] property of Result(1) to "Object".
    3. Get the value of the prototype property of the F.
    4. If Result(3) is an object, set the [[Prototype]] property of Result(1) to Result(3).
    5. If Result(3) is not an object, set the [[Prototype]] property of Result(1) to the original Object
     prototype object as described in 15.2.3.1.
    6. Invoke the [[Call]] property of F, providing Result(1) as the this value and providing the argument
     list passed into [[Construct]] as the argument values.
    7. If Type(Result(6)) is Object then return Result(6).
    8. Return Result(1).

コンストラクタ中で return で値を返さない場合(一般的にはこのケースが多いでしょうが)は
8. が実行されるわけですが,一方 return で値が返された場合(read.js 中の
XMLHttpRequest のようなケース)では 7. が実行されるということであり,
特に規格上問題があるわけでもなく,また実際の挙動でも問題はないと思いますが.

273KB
新着レスの表示

スレッドリストへ戻る 全部 前100 次100 最新50

0ch BBS 2004-10-30