예제 #1
0
파일: Timer.cs 프로젝트: liulilittle/nsjs
        public static void Initialization(NSJSVirtualMachine machine)
        {
            if (machine == null)
            {
                throw new ArgumentNullException("machine");
            }
            var extension = machine.GetExtension();

            extension.Set("setTimeout", g_setTimeoutProc);
            extension.Set("setInterval", g_setIntervalProc);
            extension.Set("clearTimeout", g_clearTimeoutProc);
            extension.Set("clearInterval", g_clearIntervalProc);
        }
예제 #2
0
        public static void Initialization(NSJSVirtualMachine machine)
        {
            if (machine == null)
            {
                throw new ArgumentNullException("machine");
            }
            Timer.Initialization(machine);
            var extension = machine.GetExtension();

            extension.Set("console", Console.ClassTemplate);
            extension.Set("alert", g_AlertProc);
            extension.Set("using", g_UsingProc);
            extension.Set("require", g_RequireProc);
            extension.Set("System", NSJSVirtualMachine.GetSystemTemplate());
        }