Illegal operation on WrappedNative prototype object...?

Discuss building things with or for the Mozilla Platform.
Posts: 6
Joined: March 30th, 2004, 6:34 am

Post Posted April 26th, 2005, 3:17 am

Since the age of Mozilla BETA, I have been using a script (a small part is shown below) to simulate parts of the DOM properties in IE.


var p =

// self.CSS2Properties
// self.CSSStyleDeclaration

function () {
var num = parseInt(this.left)
if (!num)
num = 0
return num

function (num) {
this.left = num + "px"


There have been NO problem until the latest version of FireFox, which returns the following error whenever the .posLeft property is (read/write) accessed (eg. document.getElementById("MyDiv").style.posLeft = 10).

Exception... "Illegal operation on WrappedNative prototype object" nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)"

Part of the problem lies on that "this.left" is neither read or write accessible. Does anyone have any idea how this scripting problem may be solved?

Return to Mozilla Development

Who is online

Users browsing this forum: No registered users and 3 guests