Skip to content

Commit

Permalink
Merge pull request #214 from GordonSmith/DermatologyStandalone
Browse files Browse the repository at this point in the history
Dermatology fails to load when opened in web browser with no web server.
  • Loading branch information
GordonSmith committed Feb 17, 2015
2 parents 5bb2304 + c5e94f1 commit 27601ee
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions demos/dermatology.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!doctype html>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
Expand Down Expand Up @@ -201,9 +201,15 @@
}
}
testWidget = function (widgetPath) {
require([widgetPath, "text!" + widgetPath + ".js"], function (Widget, src) {
document.getElementById("github").setAttribute("class", "prettyprint");
document.getElementById("github").innerText = src;
require([widgetPath], function (Widget) {
try {
require(["text!" + widgetPath + ".js"], function (src) {
document.getElementById("github").setAttribute("class", "prettyprint");
document.getElementById("github").innerText = src;
prettyPrint();
});
} catch (e) {
}
document.getElementById("source").innerHTML = "";
var sourceWidget = new Widget()
.target("source")
Expand All @@ -226,4 +232,4 @@
});
</script>
</body>
</html>
</html>

0 comments on commit 27601ee

Please sign in to comment.