Skip to content

Instantly share code, notes, and snippets.

@keishi
Created October 27, 2009 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keishi/219610 to your computer and use it in GitHub Desktop.
Save keishi/219610 to your computer and use it in GitHub Desktop.
var sourceFrame = new WebInspector.SourceFrame(null, null);
sourceFrame.element.src = "data:text/js,var%20foo%20%3D%20%2F%5E%5C%2F%5C%2A-secure-%28%5B%5Cs%5CS%5D%5C%0A%2A%29%5C%2A%5C%2F%5Cs%2A%24%2F%3B";
var msg = new WebInspector.ConsoleMessage(WebInspector.ConsoleMessage.MessageSource.JS, WebInspector.ConsoleMessage.MessageLevel.Log, WebInspector.ConsoleMessage.MessageLevel.Error, 1, "", 0, 1);
sourceFrame.addMessage(msg);
sourceFrame.addEventListener("syntax highlighting complete", function() {
result.push(sourceFrame.element.contentDocument.innerHTML);
testController.notifyDone(result);
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment