xuijs / xui

A tiny javascript framework for mobile web apps.
http://xuijs.com
788 stars 106 forks source link

Accessing non-existant property throws error in XUI code #18

Closed mikechambers closed 13 years ago

mikechambers commented 13 years ago

I am moving some code from JQuery to XUI, and had the following JQuery attribute access code:

$(window).attr("height");

I quickly converted this to XUI

x$(window).attr("height");

which caused an error. The issue though is that the error showed up in the XUI code, and not in my code, which made it difficult to debug.

Here is the error from Google Chrome:

Uncaught TypeError: Object [object DOMWindow] has no method 'getAttribute' h.extend.attrxui-2.0.0.min.js:9 h.fn.h.eachxui-2.0.0.min.js:6 h.extend.attrxui-2.0.0.min.js:9 updateCanvasDimensionsmain.js:363 initmain.js:105

It would be nice if the error would show up in my code, and not XUI (maybe attr can throw an error?)

filmaj commented 13 years ago

Ive got it skipping the window object for now in eece11adef93170738a9586f38a553b075b8b2c2 .. may be worth more discussion

filmaj commented 13 years ago

I'ma close this one.