Jump to content

what is a WrappedNative prototype object execption?


RIRedinPA

Recommended Posts

I'm putzing around trying to make myself smarter (it's a big hill to climb) and writing some js code to see what happens...

 

I wrote this and got the WrappedNative prototype object execption error so I'm trying to debug but I'm not sure what this error message is telling me...the Google is no help, lot's of examples of other folks about as smart as me but couldn't find an explanation of the generic error...

 


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
	<title>Javascript Stuff</title>

	<!--CSS Link-->

	<script language="javascript">

		var parentObject = { 
			one: function () { 
				document.write("This is function 1");
			},

			two: function() { 
				document.write("This is function 2");
			}
		};

		function init() { 
			document.write(parentObject.one() + parentObject.two());
		}

		window.onload = init;
	</script>
</head>
<body>
</body>
</html>

 

The whole error message:

 

Error: uncaught exception: [Exception... "Illegal operation on WrappedNative prototype object"  nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)"  location: "JS frame :: http://macdev2.merion.com/area51/javascript/ :: init :: line 22"  data: no]

 

I should note it does what I wanted it to, the output from the code is:

 

This is function 1This is function 2

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.