fixed example script; now uses current jsdom api