add node-webkit sample and fix condition bug