-
Notifications
You must be signed in to change notification settings - Fork 451
Fix the History api #142
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 the History api #142
Conversation
@zhengbli How can I remove |
Why do you need to remove the |
https://html.spec.whatwg.org/multipage/browsers.html#the-window-object |
The constructor is indeed defined in major browsers, it is just forbidden to call. For comparability I would suggest just leave it there. @mhegazy thoughts? |
I think |
} | ||
|
||
declare var History: { | ||
prototype: History; |
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.
there is a var History
i find in most browsers. why was this removed?
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.
See #142 (comment)
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.
The History
is the prototype for the type. the constructor can not be called directly, but that is the same as the rest of the HTML*Element classes as well. so we should keep both a type and a value for History
. we already have a value history: History
on Window
and the global object.
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.
Okay, fixed.
👍 Thanks! |
Fixes microsoft/TypeScript#10059