Merge pull request #36 from github/accept-text-fragment-html-as-well
Accept `text/fragment+html` as a content-type
This commit is contained in:
Коммит
1d582160df
|
@ -5,7 +5,7 @@ const requests = new WeakMap()
|
|||
export function fragment(el: Element, url: string): Promise<string> {
|
||||
const xhr = new XMLHttpRequest()
|
||||
xhr.open('GET', url, true)
|
||||
xhr.setRequestHeader('Accept', 'text/html; fragment')
|
||||
xhr.setRequestHeader('Accept', 'text/html; fragment, text/fragment+html')
|
||||
return request(el, xhr)
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче