add sample for platform.js