Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 01b82f7

Browse files
committed
refactor: add code comments
1 parent af2bd3d commit 01b82f7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ export default class IncludeFragmentElement extends HTMLElement {
147147

148148
load(): Promise<string> {
149149
observer.unobserve(this)
150+
// We mimic the same event order as <img>, including the spec
151+
// which states events must be dispatched after "queue a task".
152+
// https://www.w3.org/TR/html52/semantics-embedded-content.html#the-img-element
150153
return task()
151154
.then(() => {
152155
this.dispatchEvent(new Event('loadstart'))

0 commit comments

Comments
 (0)