Skip to content

Commit

Permalink
Merge pull request turbolinks#23 from turbolinks/ie10-compat
Browse files Browse the repository at this point in the history
Use Element.set/removeAttribute() for IE10 compat. Fixes turbolinks#21
  • Loading branch information
packagethief committed Feb 26, 2016
2 parents ad0e84b + deb55ea commit b5e0023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/turbolinks/view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ class Turbolinks.View

markAsPreview: (isPreview) ->
if isPreview
@element.dataset.turbolinksPreview = ""
@element.setAttribute("data-turbolinks-preview", "")
else
delete @element.dataset.turbolinksPreview
@element.removeAttribute("data-turbolinks-preview")

renderSnapshot: (newSnapshot, callback) ->
currentSnapshot = @getSnapshot(clone: false)
Expand Down

0 comments on commit b5e0023

Please sign in to comment.