Author Topic: Pinned Sites: Windows 7 Desktop Integration with Internet Explorer 9 - 7 - 10  (Read 1704 times)

Offline javajolt

  • Administrator
  • Hero Member
  • *****
  • Posts: 36186
  • Gender: Male
  • I Do Windows
    • windows10newsinfo.com
continued from part 6


Causing the Taskbar Button to Flash, Indicating That User Interaction Is Required

At times, you will want to notify users that your site requires interaction to advance or complete a task. Use the msSiteModeActivate method to start the flashing of the pinned site icon on the taskbar. For example, use this interaction when a user needs to enter their credentials, when a download is completed, or when another user is trying to communicate with a user.

To activate the state, call the msSiteModeActivate method.

window.external.msSiteModeActivate() ;

The icon flashes a maximum 20 times before the taskbar button stays permanently lit. After the user interacts with the site, Windows resets the taskbar button to the non-flashing state.

Icon Resolutions

Pinned sites use icons in several places: Jump List destinations, the taskbar button, thumbnail preview buttons, and overlay icons. Icon files should contain the following size representations:

• Recommended: 16x16, 32x32, 48x48
• Optimal: 16x16, 24x24, 32x32, 64x64

In a standard configuration, the taskbar icon will be 32x32, the Jump List destination icon will be 16x16, the thumbnail preview buttons will be 16x16, and the overlay icons will be 16x16. The image on the top left hand corner of the pinned site browser window holds a 24x24 version of the specified favicon. Using different .ico files, from the site favicon, to represent actions or destinations on the Jump List items and tasks will make it easier for your users to quickly identify the tasks they want to execute.

Detecting Features

You should use feature detection to verify that a browser supports pinned sites. The following code example evaluates to true if the feature is supported in your browser:

if (window.external.msIsSiteMode) {
    // Check if the website was launched from a pinned site.
    if (window.external.msIsSiteMode() )
    {
        // TRUE
    }
    else
    {
        // FALSE
    }
}

Note The Internet Explorer 9 Beta release requires that the call to test for the API happens in a try/catch block, as follows:

try {
     if(window.external.msIsSiteMode()) { }
     else {}
}
catch(e) { }


Conclusion

By using pinned sites, users integrate their favorite websites with the Windows 7 desktop, Start menu, and taskbar as they do for an application running executable code on Windows. Using the pinned sites APIs, your webpages can enhance desktop integration and push information, notifications, and alerts to users without requiring the browser window to be in view. In addition, pinned sites enable a branded experience and promote your website’s capabilities in the taskbar.

Israel Hilerio is a program manager on the Internet Explorer team.

source:msdn.microsoft.com
end
« Last Edit: October 26, 2010, 11:46:27 PM by javajolt »