Move to a full js implementation