我在30秒后设置了toast expirationTime。我预计吐司会在30秒后消失,但在约5-10秒后消失。这是我的代码:
var toast = new notifications.ToastNotification(toastXml);
var currentTime = new Date();
toast.expirationTime = new Date(currentTime.getTime() + 30 * 1000);
var toastNotifier = notifications.ToastNotificationManager.createToastNotifier();
toastNotifier.show(toast);