2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 /*jslint plusplus: true, sloppy: true, todo: true, vars: true, browser: true, devel: true, maxerr: 999 */
18 /*global $, tizen, app */
21 (function () { // strict mode wrapper
26 * Loader init - load the App constructor
28 init: function init() {
30 $.getScript('js/app.js')
35 .fail(this.onGetScriptError);
41 loadLibs: function loadLibs() {
43 if ($.isArray(app.requires)) {
44 $.each(app.requires, function (index, filename) {
48 if (loadedLibs >= app.requires.length) {
52 .fail(this.onGetScriptError);
60 onGetScriptError: function onGetScriptError(e, jqxhr, setting, exception) {
61 console.error('An error occurred: ' + e.message);
63 }).init(); // run the loader