دليل استخدام برنامج CourseLab المقطع السابقالمقطع التالي  
للمستخدمين ذوي الخبرة > تنفيذ كود جافا سكربت كيفي

تنفيذ كود جافا سكربت كيفي

CourseLab runtime allows to include custom JavaScript functions and objects. Each module folder contains special module.js file, which is intended to contain custom functions.

This file already contains two empty functions, which are called at the start of module and on module unload. These functions could not be deleted, but you can edit these functions.

// InitModule
function InitModule()
{
}

// ShutdownModule
function ShutdownModule()
{
}

IMPORTANT! To avoid cross-naming of variables and objects please try do not use global variables. It is the good practice to use custom prefixes or container object for your variables, functions and objects.