ie8 support (closes #96)

This commit is contained in:
hakimel 2012-08-03 21:49:29 -04:00
parent 6bc92af17c
commit 9a657e2676
6 changed files with 47 additions and 26 deletions

View File

@ -202,6 +202,7 @@ You can change the appearance of the speaker notes by editing the file at `plugi
- Added support for slides written using markdown
- Added helped method ```Reveal.getQueryHash()```
- Added EOT font for IE support
- IE8 support
#### 1.4
- Main ```#reveal container``` is now selected via a class instead of ID

File diff suppressed because one or more lines are too long

View File

@ -19,6 +19,10 @@
<link rel="stylesheet" href="css/print.css" type="text/css" media="print">
<link rel="stylesheet" href="lib/css/zenburn.css">
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,5 +1,5 @@
/*!
* reveal.js 1.5 r8
* reveal.js 1.5 r9
* http://lab.hakim.se/reveal-js
* MIT licensed
*
@ -1028,11 +1028,15 @@ var Reveal = (function(){
// Forward event binding to the reveal DOM element
addEventListener: function( type, listener, useCapture ) {
if( 'addEventListener' in window ) {
( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture );
}
},
removeEventListener: function( type, listener, useCapture ) {
if( 'addEventListener' in window ) {
( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture );
}
}
};
})();

View File

@ -2,7 +2,10 @@
// Modified by Hakim to handle markdown indented with tabs
(function(){
[].forEach.call( document.querySelectorAll('[data-markdown]'), function fn(elem){
var slides = document.querySelectorAll('[data-markdown]');
for( var i = 0, len = slides.length; i < len; i++ ) {
var elem = slides[i];
// strip leading whitespace so it isn't evaluated as code
var text = elem.innerHTML;
@ -19,7 +22,6 @@
// here, have sum HTML
elem.innerHTML = (new Showdown.converter()).makeHtml(text);
});
}
})();

7
lib/js/html5shiv.js vendored Normal file
View File

@ -0,0 +1,7 @@
document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('aside');
document.createElement('footer');
document.createElement('hgroup');