0

include() statement

Hi, I saw that all the sample apps use the init.js file to initialize the application. Inside this file, there are include statements like those below:

include("Framework/kontx/1.1/src/all.js");

include("Javascript/core/preferences.js");
include("Javascript/core/snippetableview.js");

There are few things that i don't understand about it:

  1. Does the include() statement is part of Javascript?
  2. Does the supplied path for the include() statement should be relative to the "Contents" folder?
  3. Why does the "Framework" folder is not located under the "Contents" folder of each application? On the other hand, the "Javascript" folder is actually there in all the sample apps. How does the Include() statement knows where to find the "Framework" folder?

I would be grateful if you could expline to me this issue. Thanks!

by
1 Reply
  • Hi Roy,

    The include function is a special function provided by Yahoo CTV platform meant to be used for including script files. You don't need to worry about how the framework gets included. For your widget, the paths for the include must be relative to the "Contents" folder.

    Thanks,

    Vivek

    0

Recent Posts

in Getting Started / Beginners - Yahoo! TV Widgets