Skip to content
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

Updates to enable SMIL in all versions of IE #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
<a href='test-page.html'>HTML test</a>
<a href='test-page.xhtml'>XHTML test</a>
<a href='status.html'>current testing status</a>
<br>
<a href='svg-boilerplate.html'>SVG Boilerplate</a>
<a href='svg-boilerplate-smil.html'>SVG Boilerplate + SMIL</a>
</body>
</html>
30 changes: 30 additions & 0 deletions js/modernizr-1.6.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions js/smil.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
This is a locally modified version of FakeSMIL, will be rolled back later

@id {7eeff186-cfb4-f7c3-21f2-a15f210dca49}
@name FakeSmile
@version 0.1.35
Expand Down Expand Up @@ -45,12 +43,11 @@ var timeZero;
* if declarative animations are not supported,
* the document animations are fetched and registered
*/
function initSMIL(force) {
force = force || false;
function initSMIL() {
if (document.documentElement.getAttribute("smiling")=="fake")
return;
document.documentElement.setAttribute("smiling", "fake");
smile(document, force);
smile(document);

timeZero = new Date();
// I schedule them (after having instanciating them, for sync-based events)
Expand All @@ -72,8 +69,7 @@ function xhrCallback() {
smile(this.responseXML);
}

function smile(animating, force) {
force = force || false;
function smile(animating) {
var request = window.XMLHttpRequest ? new XMLHttpRequest() : window.ActiveXObject ? new ActiveXObject("MSXML2.XMLHTTP.3.0") : null;
if(request) {
if(request.overrideMimeType)
Expand All @@ -100,7 +96,7 @@ function smile(animating, force) {
continue;
}
var impl = document.implementation;
if ((namespaceURI==svgns && (force || !impl.hasFeature("http://www.w3.org/TR/SVG11/feature#SVG-animation", "1.1"))) ||
if ((namespaceURI==svgns && !impl.hasFeature("http://www.w3.org/TR/SVG11/feature#SVG-animation", "1.1")) ||
(namespaceURI==smilanimns && !impl.hasFeature(smilanimns, "1.1")) ||
(namespaceURI==smil2ns && !impl.hasFeature(smil2ns, "2.0")) ||
(namespaceURI==smil21ns && !impl.hasFeature(smil21ns, "2.1")) ||
Expand Down
Loading