[Greasemonkey] Patterns

Edward Lee edilee at gmail.com
Thu Apr 14 12:42:02 EDT 2005


On 4/12/05, Mark Pilgrim <pilgrim at gmail.com> wrote:
> - Replace an existing element
> 
> existingElement.insertBefore(newElement, existingElement);
> existingElement.parentNode.removeChild(existingElement);

Is there a reason why one wouldn't use

existingElement.parentNode.replaceChild(newElement, existingElement);

-- 
Ed


More information about the Greasemonkey mailing list