javascript “holy grail” inherit