JavaScript library for leak free method call between window