Skip to content

Instantly share code, notes, and snippets.

@Gr8Gatsby
Last active September 10, 2015 16:27
Show Gist options
  • Save Gr8Gatsby/f23f8567f0efbc558af8 to your computer and use it in GitHub Desktop.
Save Gr8Gatsby/f23f8567f0efbc558af8 to your computer and use it in GitHub Desktop.
This shows how to create a Windows System prompt.
if(typeof Windows !== 'undefined' &&
typeof Windows.UI !== 'undefined' &&
typeof Windows.UI.Popups !== 'undefined' ) {
// Create the message dialog and set its content
var msg = new Windows.UI.Popups.MessageDialog(message);
// Add commands
msg.commands.append(new Windows.UI.Popups.UICommand("Okay", systemAlertCommandInvokedHandler));
// Set default command
msg.defaultCommandIndex = 0;
// Show the message dialog
msg.showAsync();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment