File tree 3 files changed +4
-1
lines changed
3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 14
14
"mocha" : true
15
15
},
16
16
"rules" : {
17
+ "github/no-inner-html" : " off" ,
17
18
"github/unescaped-html-literal" : " off"
18
19
}
19
20
}
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ async function handleData(el: IncludeFragmentElement) {
32
32
return getData ( el ) . then (
33
33
function ( html : string ) {
34
34
const template = document . createElement ( 'template' )
35
+ // eslint-disable-next-line github/no-inner-html
35
36
template . innerHTML = html
36
37
const fragment = document . importNode ( template . content , true )
37
38
const canceled = ! el . dispatchEvent ( new CustomEvent ( 'include-fragment-replace' , { cancelable : true , detail : { fragment} } ) )
@@ -163,6 +164,7 @@ export default class IncludeFragmentElement extends HTMLElement {
163
164
164
165
constructor ( ) {
165
166
super ( )
167
+ // eslint-disable-next-line github/no-inner-html
166
168
this . attachShadow ( { mode : 'open' } ) . innerHTML = `
167
169
<style>
168
170
:host {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ function when(el, eventType) {
78
78
setup ( function ( ) {
79
79
count = 0
80
80
window . IncludeFragmentElement . prototype . fetch = function ( request ) {
81
- const pathname = new URL ( request . url ) . pathname
81
+ const pathname = new URL ( request . url , window . location . origin ) . pathname
82
82
return Promise . resolve ( responses [ pathname ] ( request ) )
83
83
}
84
84
} )
You can’t perform that action at this time.
0 commit comments