Changing the following line in the addStylesheets function from: var loaded = _(document.styleSheets).chain().pluck("href").without(""). map(this.rebuildURLIfIE).value();
to: var loaded = _(document.styleSheets).chain( ).pluck("href").without("").without(null).map(this.rebuildURLIfIE).value(); ...seems to fix the issue for me locally. I did not do any extensive testing though, but it seems simple enough. On Mon, Jun 25, 2012 at 10:23 PM, Ray Nicholus <rnicho...@widen.com> wrote: > I would never even open IE if I had the choice. The javascript console > looks like someone's high school project. > > It turns out that IE's exception message was, as usual, misleading. I > should also mention that I was getting the same exception message when > tapestry attempted to execute consolefn.call in this function: > > function level(className, consolefn) { > return function (message) { > display(className, message); > > // consolefn may be null when there is no native console, in > which case > // do nothing more > consolefn && consolefn.call(console, message); > } > } > > But that's not the source of my problem. Looking closer, it turns out > that the real cause of the failure starts here in the addScripts function: > > addStylesheets: function (stylesheets) { > if (!stylesheets) > return; > > var _ = T5._; > > var loaded = > _(document.styleSheets).chain().pluck("href").without("").map(this.rebuildURLIfIE).value(); > ....... > } > > When running in IE, the StyleSheetList returned by document.styleSheets > contained an entry with a null href attribute. This results in a null > "path" value passed to the rebuildURL function, which causes a failure on > the first line of that function. > > That said, it looks to me like this is a bug in Tapestry. The modernizr > js library contributes a <style> element in IE. Tapestry picks this up in > the StyleSheetList provided by the document.styleSheets call. Since this > is a style element, and not a link element, Tapestry should probably filter > this out of the StyleSheetList since there will be no href attribute and > the rebuildURL function is not appropriate here. > > On Mon, Jun 25, 2012 at 5:05 PM, Howard Lewis Ship <hls...@gmail.com>wrote: > >> That does seem odd. IE gets the least coverage, at least by me, since I >> can >> only run it in a VM, and it has the worst debugging experience of any >> browser. This still seems quite fishy though ... since when can you not >> call() a Function? >> >> On Mon, Jun 25, 2012 at 3:03 PM, Ray Nicholus <rnicho...@widen.com> >> wrote: >> >> > I'm seeing the following javascript exception in IE only when the >> > ajaxRequest function is called in tapestry.js: >> > >> > Object doesn't support property or method 'call' >> > >> > >> > I've confirmed that successHandler is not null, and call appears to be >> > available as a native function. as one would expect. Any idea what is >> > going on here? The code below is from ajaxRequest in tapestry.js. >> > >> > >> > try { >> > /* Re-invoke the success handler, capturing any >> > exceptions. */ >> > successHandler.call(this, response, >> jsonResponse); >> > } catch (e) { >> > finalOptions.get('onException').call(this, >> > response); >> > } >> > >> >> >> >> -- >> Howard M. Lewis Ship >> >> Creator of Apache Tapestry >> >> The source for Tapestry training, mentoring and support. Contact me to >> learn how I can get you up and productive in Tapestry fast! >> >> (971) 678-5210 >> http://howardlewisship.com >> > >