View Full Version : Need widget to perform function when Dashboard is active

Mar 5, 2009, 06:05 PM
I want my widget when dashboard is opened by the user too run a function. Not just when the widget is loaded for the first time on startup. I'm using this document as a guideline...http://developer.apple.com/documentation/AppleApplications/Conceptual/Dashboard_ProgTopics/Articles/Events.html#//apple_ref/doc/uid/TP40003044-DontLinkElementID_35

Here is a quick example of what I have that doesn't seem too run when dashboard is opened.

if (window.widget)
widget.onshow = onshow;

function onshow()
helloText.style.visibility = 'visible'

What would I be doing incorrectly?