<commit_before>enyo.kind({
	name: "enyo.sample.AjaxSample",
	kind: "FittableRows",
	classes: "enyo-fit ajax-sample",
	components: [
		{kind: "FittableColumns", classes:"onyx-toolbar-inline", components: [
			{content: "YQL: "},
			{kind: "onyx.Input", name:"query", fit:true, value:'select * from upcoming.events where woeid in (select woeid from geo.places where text="Sunnyvale, CA")'},
			{kind: "onyx.Button", content:"Fetch", ontap:"fetch"}
		]},
		{kind: "onyx.TextArea", fit:true, classes:"ajax-sample-source"}
	],
	fetch: function() {    
		var ajax = new enyo.Ajax({
			url: "http://query.yahooapis.com/v1/public/yql?format=json"
		});
		// send parameters the remote service using the 'go()' method
		ajax.go({
			q: this.$.query.getValue()
		});
		// attach responders to the transaction object
		ajax.response(this, "processResponse");
	},
	processResponse: function(inSender, inResponse) {
		// do something with it
		this.$.textArea.setValue(JSON.stringify(inResponse, null, 2));
	}
});<commit_msg>ENYO-949: enyo.Ajax does not handle errors but on IE8 & Safari<commit_after>enyo.kind({
	name: "enyo.sample.AjaxSample",
	kind: "FittableRows",
	classes: "enyo-fit ajax-sample",
	components: [
		{kind: "FittableColumns", classes:"onyx-toolbar-inline", components: [
			{content: "YQL: "},
			{kind: "onyx.Input", name:"query", fit:true, value:'select * from upcoming.events where woeid in (select woeid from geo.places where text="Sunnyvale, CA")'},
			{kind: "onyx.Button", content:"Fetch", ontap:"fetch"}
		]},
		{kind: "FittableColumns", classes:"onyx-toolbar-inline", components: [
			{content: "URL: "},
			{kind: "onyx.Input", name:"baseUrl", fit:true, value:'http://query.yahooapis.com/v1/public/yql?format=json'}
		]},
		{kind: "onyx.TextArea", fit:true, classes:"ajax-sample-source"}
	],
	fetch: function() {    
		var ajax = new enyo.Ajax({
			url: this.$.baseUrl.getValue()
		});
		// send parameters the remote service using the 'go()' method
		ajax.go({
			q: this.$.query.getValue()
		});
		// attach responders to the transaction object
		ajax.response(this, "processResponse");
		// handle error
		ajax.error(this, "processError");
	},
	processResponse: function(inSender, inResponse) {
		// do something with it
		this.$.textArea.setValue(JSON.stringify(inResponse, null, 2));
	},
	processError: function(inSender, inResponse) {
		alert("Error!");
	}
});
{'fraction_non_alphanumeric': 0.1800251783466219, 'fraction_numerical': 0.003357112882920688, 'mean_word_length': 4.531322505800464, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6162095', 'n_tokens_mistral': 891, 'n_tokens_neox': 823, 'n_words': 184}