grid.parse(data,"json") causing exception

v4.13 and v4.2 at least

grid.parse(data,“json”) can cause a “Type Error: undefined is not a function” exception if the grid was not previously loaded via grid.load.

To reproduce, take the sample at:
dhtmlx.com/docs/products/dhtmlxG … _json.html

and comment out the line:
myGrid.load("…/common/data.json",“json”);

and observe the exception that occurs when you click and execute:

myGrid.parse(data,“json”)

In debugging my app using a compiled v4.13 dhtmlx_debug.js, I’ve determined that the exception occurs when attempting to fire the onXLE event during the grid.parse execution.

The problem occurs in the ‘parse’ function (line 40302):

	parse:function(data, call, type){
		if (arguments.length == 2 && typeof call != "function"){
			type=call;
			call=null;
		}
		type=type||"xml";
		this._data_type=type;

		if (type == "xml" && typeof data == "string")
			data = { responseXML: dhx4.ajax.parse(data) };

		this["_process_"+type](data);
		if (!this._contextCallTimer)
			this.callEvent("onXLE", [this,0,0,data]);  <<-- this causes the exception
		if (call)
			call();
	},

In which browser issue occurs for you?
I have commented the line, mentioned above and sample still works correctly while testing from my side.

It was failing in dhtmlx413 on Chrome (latest). I’ve since updated to v420 and now the problem does not appear.