JSConf.eu opening song - JavaScript Will Listen - Bella Morningstar
- Plask - Dean McNamee
- Plask
// Object.create Partial Polyfill with minimum Support for second parameter | |
if (!Object.create) { | |
Object.create = function(o, props) { | |
function F() {} | |
F.prototype = o; | |
result = new F(); | |
if (!props) return result; | |
for (var prop in props) { | |
if (!props.hasOwnProperty(prop)) continue; | |
result[prop] = props[prop].value; |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
function sayHook = function () { | |
// do some stuff | |
// call original say() method | |
return Object.getPrototypeOf(this).say.apply(this, Array.prototype.slice.call(arguments, 1)); | |
} | |
obj.say = sayHook; |
//the code of the example | |
ds.Employee.length |