javascript - Accessing a MooTools Class Method from outside the class -
I have a method inside the MooTools class that I want to access after uploading files with AJAX (iFrame) . Javascript which runs the iframe page, when it loads, the class must call the method, but I am unable to use it anyhow: class name: was started in the main class class: myMain
parent.window.mymain.myMethod parent.window.Main.myMethod
Is this also possible? If so, how do I do this?
I like the syntax:
var MyClass = new orbit ( {/ * List regular non-static manner as usual); MyClass.staticMethod = function () {/ body of stable work};
You have the advantage:
- You call the static code through
MyClass.staticMethod ()
inside and out - It is not possible to accidentally use this pointer as it is not available
To access a static method in an internal frame use window.parent.MyClass.staticMethod ();
Comments
Post a Comment