Update parent.js

My fix should probably be optimized, but it solves the problem of ie10