非标
此特征是非标准的,且不在标准轨道中。不要在面向 Web 的生产站点中使用它:它不适用于每个用户。实现之间可能存在大的不兼容性,且行为将来可能改变。
msthumbnailclick
event occurs when a user clicks a button or thumbnail icon in the taskbar.
This proprietary method is specific to Internet Explorer and Microsoft Edge.
| Event Property | object.onmsthumbnailclick = handler; |
|---|---|
| addEventListener Method | object.addEventListener("msthumbnailclick", handler, useCapture) |
The onmsthumbnailclick event is available only to documents that are launched from a pinned site shortcut.
pEvtObj [in]
类型: IHTMLEventObj
Pointer to an IHTMLEventObj interface for the current event.
function thumbnailClickHandler(evt)
{
alert ("Clicked button: " + evt.buttonID);
}
document.addEventListener('msthumbnailclick', thumbnailClickHandler);
// Adds an overlay icon on your app pinned to the taskbar
window.external.msSiteModeSetIconOverlay(iconUri, toolTip);
// removes an overlay icon
window.external.msSiteModeClearIconOverlay();
// pinned icons on your taskbar can be instructed to trigger specific events on your site from the taskbar
// add an event
handlerdocument.addEventListener('msthumbnailclick', onButtonClicked, false);
// add the buttons
var btnPlay = window.external.msSiteModeAddThumbBarButton(iconUri, toolTip);
// refresh the taskbar
window.external.msSiteModeShowThumbBar();
// call a javascript function when the button is pressed
function onButtonClicked(e) {
switch (e.buttonID) {
case btnPlay: play();
break;}
}