• 追加された行はこの色です。
  • 削除された行はこの色です。
by keigoi


* 日本語の解説 [#v3e7eb25]
http://d.hatena.ne.jp/keigoi/20101101/1288584308

* ocamljs バグ [#n7dc65d3]
* ocamljs あとでパッチおくる [#n7dc65d3]
- max_int がおかしい(JSのintの範囲をこえる)ので closure compilerで圧縮できない
-- 修正ずみ
- string_of_float min_floatがSafari/webkitでおかしい
-- Safariのバグ。最新のwebkitビルドでは直っている。min_floatは使わないこと
- 一部日本語文字列リテラルが化ける ''(未報告)''
-- src/jscomp/jsgen.ml を以下の通りコメントアウトしてみる
 let utf8_encode s = s
 (*  let len = String.length s in
   Utf8.from_int_array (Array.init len (fun i -> Char.code s.[i])) 0 len *)
-- 日本語文字が"\u5E74"のようにエスケープされてしまうが、一応直った
- DateクラスのgetDayメソッド(曜日を取得)がない ''(未報告)'' http://jaked.github.com/ocamljs/doc/Javascript.date-c.html https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/getDay
- getClientWidth/getClientHeightがない ← DOM標準ではないのでしょうがない?
- [[document.stylesheet.insertRule:https://developer.mozilla.org/en/DOM/stylesheet.insertRule]] ほか stylesheetクラスのメソッド

* ocamljs そのほか [#qfb04eb7]
- closure compilerでsimple圧縮すると動かなかった(keigoiの日記参照)が修正された。

- 次のコード (Dom.documentに意味はない; なんでもいい)
 let f (e:Dom.element) = (fun e -> e#removeChild (Dom.document :> Dom.element)) e
でエラー
 Error: This expression (右端のe) has type
          D.element =
            < _get_accessKey : string;
  (49個のメソッドが続く…)
              removeChild : 'n 'o. (< .. > as 'n) -> (< .. > as 'o);
              removeEventListener : string ->
                                    (D.event -> unit) -> bool -> unit;
              removeEventListener_keyEvent_ : string ->
                                              (D.keyEvent -> unit) ->
                                              bool -> unit;
              removeEventListener_mouseEvent_ : string ->
                                                (D.mouseEvent -> unit) ->
                                                bool -> unit;
              replaceChild : 'p 'q 'r.
                               (< .. > as 'p) ->
                               (< .. > as 'q) -> (< .. > as 'r);
              setAttribute : string -> string -> unit >
        but an expression was expected of type
          < removeChild : D.element -> 's; .. >
        Type 'n is not compatible with type
          D.element =
            < _get_accessKey : string;
  (49個のメソッドが続く…)
              removeChild : 'n 'o. (< .. > as 'n) -> (< .. > as 'o);
              removeEventListener : string ->
                                    (D.event -> unit) -> bool -> unit;
              removeEventListener_keyEvent_ : string ->
                                              (D.keyEvent -> unit) ->
                                              bool -> unit;
              removeEventListener_mouseEvent_ : string ->
                                                (D.mouseEvent -> unit) ->
                                                bool -> unit;
              replaceChild : 'p 'q 'r.
                               (< .. > as 'p) ->
                               (< .. > as 'q) -> (< .. > as 'r);
              setAttribute : string -> string -> unit > 
        The first object type has no method _get_accessKey
これは
 let f (e:Dom.element) = (fun e -> (e:>Dom.element)#removeChild (Dom.document :> Dom.element)) e
とすれば通るが、なぜか。

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS