brianleroux / xui

A tiny javascript framework for mobile web apps.
http://github.com/xui/xui
391 stars 159 forks source link

WebOS: Emile style normalization fails, (no child nodes exist) #43

Closed clintandrewhall closed 13 years ago

clintandrewhall commented 13 years ago

Not sure where this bug belongs, WebOS or Emile, but line 1300 of XUI-Full fails. I suspect innerHTML is not honored if the node is not part of the DOM.

Take this test case, adapted from the Emile code:

var parseEl = document.createElement("div"); parseEl.innerHTML = "<div style=\"height:100px\"></div>"; Mojo.Log.error("NODE 0: " + parseEl.childNodes[0]); var css = parseEl.childNodes[0].style;

Result: error: NODE 0: undefined

I'm writing up a better test case, but I thought I'd toss this out there to make sure I'm not crazy.

clintandrewhall commented 13 years ago

Looks like github removed my markup on the parseEl.innerHTML line...

brianleroux commented 13 years ago

clint is this still an issue on the main xui/xui?

clintandrewhall commented 13 years ago

I haven't had a chance to test it yet... I will this weekend, though. Sorry for the delay!