1.11M Members

Illegal operation on WrappedNative prototype object

 
0
 

I am getting the exception in firefox 3.6.10

"Illegal operation on WrappedNative prototype object" nsresult:
"0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)"
<myfilename>::anonymous::line 172

I am using prototype.js and the line as folows,

var dropInsertBeforeElement = createElement("<div id='drop_insert_before_" + this.id + "' style='height:6px; width:" + totalWidth + "px;'>");

The exact place in prototype.js

var Enumerable = (function() {
  function each(iterator, context) {
    var index = 0;
    try {
      this._each(function(value) {
        iterator.call(context, value, index++);
      });
    } catch (e) {
      if (e != $break) throw e;  // here the exception is gettin 
    }
    return this;
  }

This works fine in IE.

Please help me to figure out the problem.

Please let me know if you need any more information.
Regards,
SSM

 
0
 

instead of:

var dropInsertBeforeElement = createElement("<div id='drop_insert_before_" + this.id + "' style='height:6px; width:" + totalWidth + "px;'>");

try:

var dropInsertBeforeElement = document.createElement("div");
dropInsertBeforeElement.id='drop_insert_before_' + this.id;
dropInsertBeforeElement.style.height='6px';
dropInsertBeforeElement.style.width= totalWidth + 'px';
You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article