adapt to node-webkit client