turbolinks 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,7 @@ visit = (url) ->
|
|
9
9
|
fetchReplacement = (url) ->
|
10
10
|
xhr = new XMLHttpRequest
|
11
11
|
xhr.open 'GET', url, true
|
12
|
+
xhr.setRequestHeader 'Accept', 'text/html, application/xhtml+xml, application/xml'
|
12
13
|
xhr.onload = -> fullReplacement xhr.responseText, url
|
13
14
|
xhr.send()
|
14
15
|
|
@@ -38,7 +39,7 @@ replaceHTML = (html) ->
|
|
38
39
|
|
39
40
|
extractLink = (event) ->
|
40
41
|
link = event.target
|
41
|
-
until link is
|
42
|
+
until link is document or link.nodeName is 'A'
|
42
43
|
link = link.parentNode
|
43
44
|
link
|
44
45
|
|