Error Dom Exception Syntax Err 12
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business safari dom exception 12 Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation
Dom Exception 12 Setrequestheader
Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just dom exception 12 an invalid or illegal string was specified like you, helping each other. Join them; it only takes a minute: Sign up SYNTAX_ERR: DOM Exception 12 - Hmmm up vote 33 down vote favorite 6 I have been working on a small slideshow / public dom exception 12 phantomjs display for a client that uses HTML5 Rock's Slideshow code. I have run into a DOM Exception 12 - a syntax error that is supposedly related to CSS selectors - while monkeying around with it... but I can't trace it back to any changes I made in the code. I am thinking it might be something that was uncovered as I added features. I have traced it down to this object (live version here): var
Capybara Dom Exception 12
SlideShow = function(slides) { this._slides = (slides || []).map(function(el, idx) { return new Slide(el, idx); }); var h = window.location.hash; try { this.current = h; } catch (e) { /* squeltch */ } this.current = (!this.current) ? "landing-slide" : this.current.replace('#', ''); if (!query('#' + this.current)) { // if this happens is very likely that someone is coming from // a link with the old permalink format, i.e. #slide24 alert('The format of the permalinks have recently changed. If you are coming ' + 'here from an old external link it\'s very likely you will land to the wrong slide'); this.current = "landing-slide"; } var _t = this; doc.addEventListener('keydown', function(e) { _t.handleKeys(e); }, false); doc.addEventListener('touchstart', function(e) { _t.handleTouchStart(e); }, false); doc.addEventListener('touchend', function(e) { _t.handleTouchEnd(e); }, false); window.addEventListener('popstate', function(e) { if (e.state) { _t.go(e.state, true); } }, false); }; Instantiation of SlideShow() (line 521 in main.js): var slideshow = new SlideShow(queryAll('.slide')); Calling queryAll('.slide') returns an array of all the slides with an class of .slide. However, when passing queryAll('.slide') as a parameter for instantiating SlideShow(), it returns a DOM Exception 12 error. Has anybody seen this before? javascript html5 dom syntax-error domexception share|improve this question edited Sep 6 '11 at 7:54 Dr.Molle 90.8k10111133 asked Sep 6 '11 at 5:07 Crossdiver 4632717 Are you sure it returns an array, or might it return a nod
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring jquery dom exception 12 developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question error: syntaxerror: dom exception 12 setrequestheader@[native code] x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them;
Safari Error Syntaxerror Dom Exception 12
it only takes a minute: Sign up Error: SyntaxError: DOM Exception 12 setRequestHeader@[native code] up vote 6 down vote favorite I am in the process of developing a mobile application for Android and IOS, with Phonegap and AngularJS, CORS_REST. I http://stackoverflow.com/questions/7315162/syntax-err-dom-exception-12-hmmm have just about everything working for the headers on Android. When testing on an iPhone with GapDebug. Here is an example of the authentication code: $http.post('someurlhere', {username: username, password: password}) .then(function (response) { if(!response.IsAuthenticated) { alertsManager.addAlert('Username or password is incorrect', 'alert-danger'); } callback(response); console.log(response); }); I am getting this a an error: SyntaxError: DOM Exception 12_IMG If anyone could please help I would greatly appreciate it. Thank You: iphone angularjs http-headers cors share|improve this question edited Jan 7 at http://stackoverflow.com/questions/34620703/error-syntaxerror-dom-exception-12-setrequestheadernative-code 21:19 asked Jan 5 at 20:32 Jon Nowak 357 add a comment| 1 Answer 1 active oldest votes up vote 9 down vote accepted Please, check your headers params, iOS9 does not accept parameters in the http headers that has space at the beginning of the value. Example: "Token":" Token12345" => wrong "Token":"Token12345" => correct I hope this helps you. share|improve this answer answered Jan 6 at 13:53 William Sousa 1062 Would this be on the server side? –Jon Nowak Jan 7 at 14:04 2 Great catch! In case it's useful for someone else: I think a trailing space also causes this error. For example including a header like this: "Authorization: Bearer " –hookdump Jun 11 at 20:36 @hookdump had this same error, that fixed it for me! –OJ7 Jul 14 at 16:20 @hookdump had this same error, that fixed it for me also !!!! –samneric Aug 12 at 0:59 Fixed a problem for me in Safari on OSX as well. –Michael Daw Sep 11 at 3:08 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're l
Sign in Pricing Blog Support Search GitHub This repository Watch 21 Star 215 Fork 40 jpillora/xhook Code Issues 12 Pull requests 4 Projects 0 Pulse Graphs New issue Safari 6 bug: "SYNTAX_ERR: DOM Exception 12: An invalid or https://github.com/jpillora/xhook/issues/11 illegal string was specified." #11 Closed aseemk opened this Issue Feb 19, 2014 · 7 http://answers.microsoft.com/en-us/ie/forum/ie9-windows_vista/syntax-error-with-ie9-dom-exception-syntaxerr12/a3ae992a-bcb0-4007-8368-b086e0d38569 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 2 participants aseemk commented Feb 19, 2014 Hi there, Great work on xhook and xdomain. Really like the idea, and we're switching to it in an app I work on, to get rid of annoying CORS pre-flight requests for our JSON API. dom exception Unfortunately, the switch has killed our app in Safari 6 with the following error: SYNTAX_ERR: DOM Exception 12: An invalid or illegal string was specified. I've debugged this error to this part of xhook: send = function() { var header, value, _j, _len1, _ref1, _ref2; transiting = true; xhr.open(request.method, request.url, true, request.user, request.pass); _ref1 = ['type', 'timeout']; for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { k = _ref1[_j]; modk = dom exception 12 k === "type" ? "responseType" : k; xhr[modk] = request[k]; // <------------ this line } _ref2 = request.headers; for (header in _ref2) { value = _ref2[header]; xhr.setRequestHeader(header, value); } if (request.body instanceof window[FormData]) { request.body = request.body.fd; } xhr.send(request.body); }; k is indeed "type", but request.type is undefined, and Safari 6 rejects setting xhr.responseType to undefined. It seems to work fine in Safari 7 (Mavericks), iOS 7 Mobile Safari, and Chrome. We're on the latest xdomain 0.6.1 which contains xhook 1.1.4. We're using xdomain with jQuery 1.10, but not making Ajax calls directly; we're a Backbone app, so it's doing that automatically / under the hood. Any ideas? Thanks for the help! Owner jpillora commented Feb 19, 2014 Will fix now. Thanks for the debugging effort :) … On Thursday, February 20, 2014, Aseem Kishore ***@***.***> wrote: Hi there, Great work on xhook and xdomain. Really like the idea, and we're switching to it in an app I work on, to get rid of annoying CORS pre-flight requests for our JSON API. Unfortunately, the switch has killed our app in Safari 6 with the following error: SYNTAX_ERR: DOM Exception 12: An invalid or illegal string was specified. I've debugged this error to this part of xhook: send = function() { var header, value, _j, _len1, _ref1, _ref2; transiting =
be down. Please try the request again. Your cache administrator is webmaster. Generated Sun, 09 Oct 2016 20:44:58 GMT by s_ac4 (squid/3.5.20)