rewrote DOM insertion handler to eliminate implicit eval