javascript cnets implementation