Je travaille sur un petit diaporama / affichage public pour un client qui utilise HTML5 Rock Diaporama code. J'ai couru dans un DOM à l'Exception de 12 une erreur de syntaxe qui est censé être liées à des sélecteurs CSS - tout monkeying autour avec elle... mais je ne peux pas le faire remonter à toutes les modifications que j'ai apportées dans le code. Je pense qu'il pourrait être quelque chose qui a été découvert que j'ai ajouté des fonctionnalités.
J'ai fait remonter jusqu'à cet objet (version live ici):
var 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);
};
L'instanciation d' SlideShow()
(ligne 521 en main.js):
var slideshow = new SlideShow(queryAll('.slide'));
Appelant queryAll('.slide')
() retourne un tableau de toutes les diapositives avec une classe de .slide
. Cependant, lors du passage d' queryAll('.slide')
comme paramètre pour l'instanciation SlideShow()
, elle renvoie un DOM Exception 12
d'erreur.
Personne n'a vu cela auparavant?