[Javascript] Firefox Prototyping -or does it?!`
Troy III Ajnej
trojani2000 at hotmail.com
Sat Mar 31 00:39:42 CDT 2012
<!DOCTYPE html>
<html>
<head>
<title>An HTML Document</title>
<script> String.prototype.Normalize=
function(x){return(x||this).match(/\S+/gi).join(' ')};
var str = " this string has to many spaces "; </script>
</head>
<body class=example>
<h1>Example</h1>
<p>This is an example HTML document.
</body>
</html><!DOCTYPE html>
<html>
<head>
<title>An HTML Document</title>
<script>
String.prototype.Normalize=
function(x){return(x||this).match(/S+/gi).join(' ')};
var str = ' this string has to many spaces ';
</script>
</head>
<body class=example>
<h1>Example</h1>
<p>This is an example HTML document.
</body>
</html>"
Now invoke your Firefox console
(win: [ctrl+shift+k])type in:
str.Normailze();hit enter;
if you don't get:"TypeError: str.Normalize is not a function"I'm seeing things! But even than -it doesn't change the fact that you
are rude or just another uneducated fan-boy that likes to insult other people.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Troy III
progressive art enterprise
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the Javascript
mailing list