I have an object generated by this code, but I can only use it when its obj.ready property is == true. I can use only pure JavaScript or Prototypejs. It script is inserted as source (< script src=...).
Is there a way to detect when the object is ready to use? I tried to put observer on dom:loaded, but it didn't work.
I use
PagSeguroDirectPayment.setSessionId('someTextHere');
PagSeguroDirectPayment.getSenderHash();
The second line doesnt work because the object is not ready yet.
Any help is appreciated.