Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 0.2 IE object does not support error #2

Closed
bootnumlock opened this issue Jul 24, 2013 · 14 comments
Closed

version 0.2 IE object does not support error #2

bootnumlock opened this issue Jul 24, 2013 · 14 comments

Comments

@bootnumlock
Copy link

slimage.js, line 13 character 78
SCRIPT438: Object doesn't support property or method 'apply'

oddly it is rendering some of the images, then it errors. Any thoughts?

@lilith
Copy link
Member

lilith commented Jul 26, 2013

Workaround is to set window.slimmage = {verbose: false}; prior to loading the script. If you opened the developer tools, then closed them shortly afterwards it could cause this.

What version of IE are you using? I'd like to try to reproduce this and understand what's happening.

  var log = function(){ if (typeof(w.console) != "undefined" && s.verbose) w.console.log.apply(w.console,arguments);};

@bootnumlock
Copy link
Author

base version is 9, but switching between version rendering in dev tools - fairly consistent error.

@lilith
Copy link
Member

lilith commented Jul 26, 2013

Does this work?

 var log = function(){ if (w.console && w.console.log && s.verbose) w.console.log.apply(w.console,arguments);};

@bootnumlock
Copy link
Author

i will have to look into it over the weekend... deadline with client project right now... sorry.

lilith added a commit that referenced this issue Jul 29, 2013
Fixed issue #2
lilith added a commit that referenced this issue Jul 29, 2013
Fixing issue #2
@lilith
Copy link
Member

lilith commented Jul 29, 2013

Fixed with 0.2.1

@lilith lilith closed this as completed Jul 29, 2013
@Newnab
Copy link

Newnab commented Sep 23, 2013

I experienced this issue, using 0.2.1.min.js, in IE8. It rendered one image (The first one) and then failed to render any others.

Full error:
SCRIPT438: Object doesn't support property or method 'apply'
slimmage-0.2.1.min.js, line 3 character 75

Using your workaround of setting verbose:false has made it work, but I thought you'd want to know so you can potentially address it in a future version.

@lilith
Copy link
Member

lilith commented Sep 23, 2013

So window.console.log is defined, but not a function? What other libraries are you using?

@Newnab
Copy link

Newnab commented Sep 24, 2013

Not sure what you mean by window.console.log being defined but not a function... I can console.log things if I want to?

There are a few other libraries in play but nothing I'd expect to interfere with slimmage directly... jQuery (1.10.0), modernizr (2.6.2-respond-1.1.0), selectivizr (1.0.2)...

@lilith
Copy link
Member

lilith commented Oct 15, 2013

Got more info. It looks like some IE dev tools are defining console.log as an empty object. This is horrible, and means I'll probably have to try/catch (since typeof is buggy with native functions).

@lilith lilith reopened this Oct 15, 2013
@lilith
Copy link
Member

lilith commented Oct 15, 2013

0.2.2 should provide the fix. Got sidetracked by a typo in the demo html. By the way - data-image-src doesn't work - it's gotta be data-img-src. In case anyone else makes the same harebrained mistake

@bootnumlock
Copy link
Author

yeah, i just got burned on another project with console.log... fyi... it no worky in Safari either - meaning reference to console.log :(

@lilith
Copy link
Member

lilith commented Oct 15, 2013

Are you having problems with 0.2.2 in Safari, or was it just a general observation?

@bootnumlock
Copy link
Author

general observation related to console.log... have not used 0.2.2 yet.

@lilith
Copy link
Member

lilith commented Oct 24, 2013

Closed as fixed in 0.2.2

@lilith lilith closed this as completed Oct 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants