- //function creation
- if (declaration->getOptions() &&
- declaration->getOptions()->getType() == JO::ClassType::Function)
- {
- LogDebug("Loading function object " << declaration->getName());
-
- auto type = declaration->getOptions()->getIframeOverlay();
- if (JO::IFrameOverlay::OverlayedBeforeOriginal == type) {
- LogDebug("Create overlayed function");
- JSObjectPtr original =
- JavaScriptInterfaceSingleton::Instance().
- getJSObjectProperty(gContext,
- parent,
- declaration->getName());
- newObject = JSOverlaySupport::
- createWrappedFunction(gContext,
- original,
- objectInstance,
- declaration->getName());
- } else {
- LogDebug("create normal function");
- newObject = objectInstance;
- }
- } else { //object creation
- newObject = objectInstance;
- }
-