Back to Desktop Back To Desktop

Quick Widget Conversion

Quick Guide to Convert Apple Dashboard Widgets

Please check your existing Dashboard widget code if your widget doesn't run perfectly:

  • In your Javascript code replace all
    element.innerText
    by
    element.innerHTML
  • Check your startup up code. Make sure:
    • All startup code is called by
      body.onload
      Move especially all static initializing code into a setup method and call it from body.onload.
    • Wrap your body onload method by
      if (window.widget) {
        //your existing onload code
      }
    (Explaination)
  • Check your code for access to
    window.event
    and provide a proper event parameter instead.
  • Replace
    event.x and event.y
    by
    event.clientX and event clientY
    Especially check the standard widget resize code.
  • If you use the canvas element replace all
    <canvas/>
    by
    <canvas></canvas>
    and don't use deprecated context methods (see here).

For any technical questions please contact us on: developer@widgetop.com