AnsweredAssumed Answered

syntaxerror function statement requires a name

Question asked by Astaroth_666 on Oct 9, 2015
Latest reply on Oct 13, 2015 by Astaroth_666

Hi,

 

I'm trying to make a simple Gadget based on the Embeded WebApp Sample Gadget but I'm getting a syntaxerror, function statement requires a name

Here is the code of the Gadget:

var finesse = finesse || {};

 

/** @namespace */

finesse.modules = finesse.modules || {};

 

finesse.modules.EmbeddedWebGadget = (function($)

{

    /** @scope finesse.modules.EmbeddedWebGadget */

    return

    {

        init: function ( urlToLoad, contentID, iframeID )

        {

            $(contentID).html('');

            $(contentID).html('<iframe src="' + urlToLoad + '" id="'+ iframeID +'" ></iframe>');

            gadgets.window.adjustHeight();

        }

    };

}(jQuery));

 

finesse error.png

 

I also tried

return

    {

        init: function ( urlToLoad, contentID, iframeID )

        {

            $(contentID).html('');

            $(contentID).html('<iframe src="' + urlToLoad + '" id="'+ iframeID +'" ></iframe>');

            gadgets.window.adjustHeight();

        }();

    };

without any positive result.

Any ideas?

Outcomes