-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix that element has loading image #3 #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩🤩🤩🤩🤩
src/loaders/Loader.ts
Outdated
public isReady = false; | ||
public isPreReady = false; | ||
public hasDataSize = false; | ||
public hasLoading = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have changed it for testing, how about using getter?
test/unit/utils.ts
Outdated
@@ -72,5 +72,6 @@ export function expectOrders(events: EventType[], values: string[]) { | |||
// Then | |||
const eventNames = events.map(e => e.eventType); | |||
|
|||
console.log(eventNames); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove?
@@ -8,13 +8,9 @@ import Loader from "./Loader"; | |||
|
|||
export default class ImageLoader extends Loader<HTMLImageElement> { | |||
public static EVENTS = ["load", "error"]; | |||
public isPreReady() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has the interface changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loader is a class that can only be used inside, this method is used internally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue
#3
Details