examples/invalid-bind.html
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="../thread.js"></script>
<script>
// from constructor
var worker = thread({
env: {
// cannot bind native function
defer: setTimeout
}
})
worker.on('error', function (err) {
console.log('Error:', err)
})
// using the bind method
var worker2 = thread()
worker2.on('error', function (err) {
console.log('Error:', err)
})
worker2.bind({ defer: setTimeout })
</script>
</body>
</html>