O'Closure - API References

We tried to stay as close as possible to Google Closure structure Same inheritance tree One module per class or package (except in case of cyclic dependency between several classes) Same package name (except for Goog.Gdom (goog.dom), Goog.Ggraphics (goog.graphics) and Goog.Geditor (goog.editor)) Constructors have the same name system

See the API.


Google Closure

 Google Closure

OClosure

 OClosure

 

Structure

In Closure, all objects have the same hierarchy form :

goog.package[.subPackage ...].ClassName

In OClosure, the Goog module "packs" the sub modules

Goog.Package[.Subpackage ...].ClassName

Some object are defined in the same module because of cyclic dependencies

Constructors

Constructors have the name of the class :

var z = new goog.ui.Zippy();

Constructors have type

val className : args -> .. -> className Js.t constr

Modules defining objects are included in the parent package, so you have directly access to the constructors from the parent package:

let z = jsnew Goog.Ui.zippy()

Modules list

Goog

Binding of the Google Closure javascript library

Goog.​Tools
Goog.​Disposable
Goog.​Math
Goog.​Async
Goog.​Date
Goog.​Events
Goog.​Fx
Goog.​Gdom
Goog.​Geditor
Goog.​Ggraphics
Goog.​I18n
Goog.​Positioning
Goog.​Spell
Goog.​Structs
Goog.​Timer
Goog.​Ui
Goog.​UserAgent