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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.