Currently in one of my projects, i'm hijacking a div's appendChild method and proxying it to one of my own. This works all fine, but after hijacking it the appendChild attribute appears in the dom, this behavior only occurs in IE7/IE8. After playing around with the developer tools i noticed that if you clicked 'show readonly properties' you can see all the HTMLDivElement prototype's functions, but the one that had been modified is no longer considered read only. My question, is it possible to make that function which is being treated as a dom element attribute readonly again? Also for bonus points, if I can go ahead and override that function like i just did, then what's the point of that readonly flag in the first place?
Also just to make sure i got it across i only see this behavior in IE7 and IE8.
example:
<div id="element1">
</div>
var domElement = document.getElementById('element1');
domElement['appendChild'] = function newAppendChild() {....}
but the div now appears in the dom as
<div id="element1" appendChild="function newAppendChild() {...}"></div>
The end goal would be to not have appendChild displayed already.