Thursday, August 21, 2008

How to crash FireFox 3 with 3 lines of code

Hi there, here I am back from holidays :geek:

Before I'll start to write more interesting stuff, here we have 3 lines of JavaScript that could cause problems to our favourite browser, in this case version 3.0.1

I discovered this problem, already part of the bugs report site, trying to emulate keyboards events using the UIEvents interface instead of KeyboardEvents


var e = document.createEvent("UIEvents");
e.initUIEvent("keypress", true, true, this, 1);
document.documentElement.dispatchEvent(e);


Nice one? See you soon ;)

Labels: , ,

3 Comments:

Anonymous Anonymous said...

what do i do with the code idiot

19 November, 2009 18:51  
Anonymous mrhazrd said...

Idiot?...heh eh...avoid it for now, obviously...

Now, Mr Idiot, and yes, i'm talking to you, Anon...go learn some grammar and punctuation.

Then we can have a nice break from you and when you are back, your posts will be significantly easier to read.

01 December, 2009 03:55  
Anonymous Anonymous said...

Try this:

<html><body>
<form><textarea name="results"></textarea></form>
<script type="text/javascript">
for (i=0;i<1500;i++) document.forms[0].results.value += "\nHello";
</script>
</body></html>

07 May, 2010 14:59  

Post a Comment

Links to this post:

Create a Link

<< Home