This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function A (name) { | |
this.name = name; | |
this.sayMyName = this.sayMyName.bind(this); | |
} | |
A.prototype = { | |
sayMyName: () => { | |
console.log(this.name); // -> undefined | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!Ext.isEmpty(window.URL) && Ext.isFunction(window.URL.createObjectURL)) { | |
//Alors on va effectuer une requête ajax | |
var xhr = new XMLHttpRequest(); | |
xhr.open('GET', url, true); | |
xhr.responseType = 'blob'; | |
xhr.onload = function(e) { | |
//Et si tout s'est bien passé | |
if (this.status == 200) { | |
//Alors on construit un blob avec la réponse |
NewerOlder