Return to Snippet

Revision: 489
at July 16, 2006 08:15 by ringo


Initial Code
if (window.widget)
{
    widget.onshow = onshow;
    widget.onhide = onhide;
}

function onshow () {
    if (timer == null) {
        updateTime();
        timer = setInterval("updateTime();", 1000);
    }
}

function onhide () {
    if (timer != null) {
        clearInterval(timer);
        timer = null;
    }
}

Initial URL

                                

Initial Description
http://developer.apple.com/jp/documentation/AppleApplications/Conceptual/Dashboard_Tutorial/index.html?http://developer.apple.com/jp/documentation/AppleApplications/Conceptual/Dashboard_Tutorial/Events/chapter_6_section_3.html

Initial Title
dashboard widget minimal event init

Initial Tags

                                

Initial Language
JavaScript