File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 1414 "mocha" : true
1515 },
1616 "rules" : {
17+ "github/no-inner-html" : " off" ,
1718 "github/unescaped-html-literal" : " off"
1819 }
1920 }
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ async function handleData(el: IncludeFragmentElement) {
3232 return getData ( el ) . then (
3333 function ( html : string ) {
3434 const template = document . createElement ( 'template' )
35+ // eslint-disable-next-line github/no-inner-html
3536 template . innerHTML = html
3637 const fragment = document . importNode ( template . content , true )
3738 const canceled = ! el . dispatchEvent ( new CustomEvent ( 'include-fragment-replace' , { cancelable : true , detail : { fragment} } ) )
@@ -163,6 +164,7 @@ export default class IncludeFragmentElement extends HTMLElement {
163164
164165 constructor ( ) {
165166 super ( )
167+ // eslint-disable-next-line github/no-inner-html
166168 this . attachShadow ( { mode : 'open' } ) . innerHTML = `
167169 <style>
168170 :host {
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ function when(el, eventType) {
7878setup ( function ( ) {
7979 count = 0
8080 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
8282 return Promise . resolve ( responses [ pathname ] ( request ) )
8383 }
8484} )
You can’t perform that action at this time.
0 commit comments