-
Notifications
You must be signed in to change notification settings - Fork 230
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
Ensure degradation upon error. #90
Comments
Good idea, the simplest way to prevent javascript issues is to do all the work with virtual or cloned DOM and replace the form at the end. |
Yeah, the fact that this all has to happen in a bunch of browsers generally tends to make things trickier -- however, it would be pretty trivial to use something like I'm trying to avoid a legacy-mode link at all costs. The user shouldn't have to make a choice; if things don't/can't work, they should degrade gracefully. If it's an instantiation error, the user should never have to know that Skeuocard was even on the page to begin with -- and if it's a runtime error, we should alert them somehow that there was a small problem, and gracefully (with some sort of animation or something) transition back to the legacy form. Even better, I should just automate browser testing, and make sure this never happens in the first place ;) |
I totally agree ;) It's better, and you seems to master js way better than me so i'll let you handle this =p BTW about testing, this might be a good idea indeed :) And while I was adding some integrations specs for my payment form, I ran into issues (I'm using PhantomJS). I don't know why yet, i'm still investigating but phantomJS fail to run skeuocard.js with some weird exception:
I'll do more testing but if you have any idea ;) |
Ok I found the solution here: teampoltergeist/poltergeist#292 if(typeof Function.prototype.bind == 'undefined') {
Function.prototype.bind = function(target) {
var f = this;
return function() {
f.apply(target, arguments);
};
};
} It should be ok with selenium, but with headless solutions you may get into the same issue :) |
Yeah, I had a feeling it'd have something to do with |
Yes, I got more errors with |
@jarthod If you wanna give your tests another shot, I've changed the selectors on master as of v1.0.3. |
@kenkeiter I haven't tested yet but I'm gonna drop phantomJS anyway, I got other issues with my own js, the phantomjs webkit engine is too old. I'm switching to selenium. BTW I don't think this will fix the issue, in the post I linked they said the whole $('input[name=q]').get(0) == document.activeElement |
Although Skeuocard is unlikely to fail after instantiation, in the next version of Skeuocard, I want to focus upon increasing the likelihood that credit card entry will still be usable even if Skeuocard fails for some reason or another.
In my mind, this means that we need to:
Awesome.
The text was updated successfully, but these errors were encountered: