I don't know if I am "up in the night" on this or if it is an oversight, but
why doesn't removeElement use the DOM Coercion rules in the same way that
something like appendChildNodes does? Here's some sample code that
illustrates my problem:

   function MyWidget() {
   
      var widgetDomRepresentation = DIV({style:"border:solid 1px"}, "Hi!");
      var that = this;
      
      connect(widgetDomRepresentation, "onclick", function() {
         signal(that, "removeme");
      });

      this.__dom__ = function() {
         return widgetDomRepresentation;
      };
   }
   
   var myWidgetInstance = new MyWidget();
   connect(myWidgetInstance, "removeme", function() {
      removeElement(myWidgetInstance);                     // this blows up
   });
   appendChildNodes(currentDocument().body, myWidgetInstance);  

It seems to make little sense that one can append myWidgetInstance to the
DOM using MochiKit.DOM functions, but can't remove it just as easily. 

Am I missing something here?

Jason Bunting


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to