Skip to content

Instantly share code, notes, and snippets.

@neovov
Created February 7, 2013 07:17
Show Gist options
  • Save neovov/4729149 to your computer and use it in GitHub Desktop.
Save neovov/4729149 to your computer and use it in GitHub Desktop.
Silverlight method to nuke itself (just for the LOL)
[ScriptableMember]
public void nuke() {
HtmlPage.Plugin.Parent.RemoveChild( HtmlPage.plugin );
} // end of nuke()
@neovov
Copy link
Author

neovov commented Feb 7, 2013

Then just add this in JavaScript :

var element = document.getElementById("silverlight");
element.nuke = function() {
    this.content.api.nuke(); // WTFF Microsoft?
}

element.nuke(); // Ahah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment