Extending JS Object results in error

UNCONFIRMED
Unassigned

Status

()

Firefox
General
UNCONFIRMED
6 years ago
6 years ago

People

(Reporter: Federico, Unassigned)

Tracking

8 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

10.48 KB, application/octet-stream
Details
(Reporter)

Description

6 years ago
Created attachment 579490 [details]
quite simple library

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20100101 Firefox/8.0
Build ID: 20111104165243

Steps to reproduce:

I extended Object via JavaScript (this is allowed in ECMAScript and is supported by ALL browsers):

Object.prototype.xxx = function ()
{
	return 1;
};


Actual results:

If I insert that code in any script which is perfectly working, I get an error.


Expected results:

Because www() is not invoked, scripts should at least work as if it wasn't there.

Comment 1

6 years ago
Please provide a public URL or reduced test case that exhibits this issue.
Summary: object → Extending JS Object results in error
You need to log in before you can comment on or make changes to this bug.