Posts

Es werden Posts vom 2015 angezeigt.

[CoffeeScript] Polyfill for missing bind() in PhantomJS

Did receive unexplicable errors when running JS tests through Karma on a PhantomJS server, like: TypeError: 'undefined' is not a function (evaluating 'this.proxy[method].bind(this.proxy)') Looks like the problem is that PhantomJS is built with an old version of the JavaScript core where the bind method is not part of the Function prototype. There's a polyfill for that further down this page. That adds the method to the Function prototype. Here now is the same translated to CoffeeScript: if !Function::bind   Function::bind = (oThis) ->     if typeof @ != 'function'       throw new TypeError 'Function.prototype.bind - what is trying to be bound is not callable'     aArgs   = [       Array::slice.call(arguments, 1),       fToBind = this,       fNOP    = ->,       fBound  = ->  ...

Reactivating NPAPI in Google Chrome (until September 2015)

For testing purposes I wanted to activate the default flash system player in Chrome://plugins but to my surprise didn't find it in the list. According to this entry NPAPI plugin support in Chrome will be completely removed from September 2015. See here Until then NPAPI support can be manually turned back on by typing this in the address bar: chrome://flags/#enable-npapi After a restart the NPAPI flash plugin can be used again. Apart from that a content debugger PPAPI version is available for download from here: http://labs.adobe.com/downloads/flashplayer.html