[Javascript] Firefox Prototyping -or does it?!`

Sue Hewson sue at questor-cp.co.uk
Sat Mar 31 13:37:28 CDT 2012



I updated Firefox on my laptop (I only use Firefox for testing new sites & pages; my preferred browser is Chrome) to v11 and I did get the same error. It worked fine in Chrome and in an earlier version of Firefox on my PC.

Ren

On 31 Mar 2012, at 06:39 AM, "Troy III Ajnej" <trojani2000 at hotmail.com> wrote:

> 
> <!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>&lt;!DOCTYPE html&gt;
> &lt;html&gt;
> &lt;head&gt;
>   &lt;title&gt;An HTML Document&lt;/title&gt;
>   &lt;script&gt;
>     String.prototype.Normalize=
>     function(x){return(x||this).match(/S+/gi).join(' ')};
>     var str = ' this    string has  to   many    spaces ';
>   &lt;/script&gt;
> &lt;/head&gt;
> &lt;body class=example&gt;
>   &lt;h1&gt;Example&lt;/h1&gt;
>   &lt;p&gt;This is an example HTML document.
> &lt;/body&gt;
> &lt;/html&gt;" 
> 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
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
>                         
> _______________________________________________
> Javascript mailing list
> Javascript at lists.evolt.org
> http://lists.evolt.org/mailman/listinfo/javascript


More information about the Javascript mailing list