Skip to content

Commit

Permalink
Issue kemayo#56: Throws an error when used in XHTML context
Browse files Browse the repository at this point in the history
  • Loading branch information
drivron committed Feb 25, 2016
1 parent 2c4cac1 commit 3278360
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions jquery.maphilight.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@

// VML: more complex
has_VML = (function() {
var a = document.createElement('div');
a.innerHTML = '<v:shape id="vml_flag1" adj="1" />';
var b = a.firstChild;
b.style.behavior = "url(#default#VML)";
return b ? typeof b.adj == "object": true;
try {
var a = document.createElement('div');
a.innerHTML = '<v:shape id="vml_flag1" adj="1" />';
var b = a.firstChild;
b.style.behavior = "url(#default#VML)";
return b ? typeof b.adj === "object": true;
} catch (err) {
return false;
}
})();

if(!(has_canvas || has_VML)) {
Expand Down
4 changes: 2 additions & 2 deletions jquery.maphilight.min.js

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

0 comments on commit 3278360

Please sign in to comment.