Comments (4)
It may be due to the version of jQuery you are using. However, I did not test ie8.
Sent from my ASUS Transformer Pad
-------- Original Message --------
From:biiterlove [email protected]
Sent:Wed, 15 Jan 2014 01:27:03 -0800
To:"mmikowski/jquery.event.gevent" [email protected]
Subject:[jquery.event.gevent] $.gevent.publish() is not work on IE8 (#1)
Hi!, I follow the SPA book (Really good book anyway)
And now I'm creating my model just similar to the one in the book.
But when I wrote the test for it I just found that the "gevent" lib its not work on IEMy test code look similar like this
var
$t = $ (''); $.gevent.subscribe($t, 'login', function(event, name) { expect(name).to.be('Pongneng'); done(); });And in my production code I call the publish mehtod
$.gevent.publish('login', ['Pongneng']);
It's caused my test to fail and give me this error: Object doesn't support this property or method
I still don't know what to do about it yet. I just leave it for now because the other browser is work fine.—
Reply to this email directly or view it on GitHub.
from jquery.event.gevent.
I use jQuery 1.10.2. Is that a problem?
Anyway I found that it break on this line
data_list = Array.isArray( data ) ? data : [ data ];
IE8 don't have a method isArray (=_=")
I changed to
data_list = data instanceof Array ? data : [ data ];
and it work fine. (Not sure it's right or not ha ha)
from jquery.event.gevent.
Sorry about the delayed response. The instanceof looks correct at first glance. A little sniffing around shows your potential pain is much greater for IE 8:
http://whattheheadsaid.com/2010/10/cross-context-isarray-and-internet-explorer
from jquery.event.gevent.
The current release now uses the jQuery isArray method, which should fix the problem with IE 8.
from jquery.event.gevent.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery.event.gevent.