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
Substitute util.bind with Function.bind #618
Conversation
Can one of the admins verify this patch? |
README.md
Outdated
@@ -238,7 +238,7 @@ $('#calendar').tuiCalendar({ | |||
## 🌏 Browser Support | |||
| <img src="https://user-images.githubusercontent.com/1215767/34348387-a2e64588-ea4d-11e7-8267-a43365103afe.png" alt="Chrome" width="16px" height="16px" /> Chrome | <img src="https://user-images.githubusercontent.com/1215767/34348590-250b3ca2-ea4f-11e7-9efb-da953359321f.png" alt="IE" width="16px" height="16px" /> Internet Explorer | <img src="https://user-images.githubusercontent.com/1215767/34348380-93e77ae8-ea4d-11e7-8696-9a989ddbbbf5.png" alt="Edge" width="16px" height="16px" /> Edge | <img src="https://user-images.githubusercontent.com/1215767/34348394-a981f892-ea4d-11e7-9156-d128d58386b9.png" alt="Safari" width="16px" height="16px" /> Safari | <img src="https://user-images.githubusercontent.com/1215767/34348383-9e7ed492-ea4d-11e7-910c-03b39d52f496.png" alt="Firefox" width="16px" height="16px" /> Firefox | | |||
| :---------: | :---------: | :---------: | :---------: | :---------: | | |||
| Yes | +9 | Yes | Yes | Yes | | |||
| +7 | +9 | Yes | +5.1 | +4 | |
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.
Supported browser versions should not be depending on compatibility of Function.prototype.bind
TimeCreationGuide._onDrag uses Function.bind since 2017 and therefore Safari 5.1+ is required that long. Just the documentation was not updated accordingly. |
I think the browser support of the calendar application should not depend on any particular feature or method. In the past, we used to support calendars even under IE9. So instead of using the The set of these utility functions is tui.code-snippet, but in calendar 1.x version, use tui.code-snippet version 1.x. We are currently developing 2.0, and in 2.0 we will use tui.code-snippet 2.x and |
https://github.com/nhn/tui.calendar/blob/master/README.md#-browser-support says: “Safari → Yes. Internet Exporer → +9”. Does this mean,that tui calendar runs on Safari 3? |
Besides, |
handler/daygrid/creation.js contains |
This issue has been automatically marked as inactive because there hasn’t been much going on it lately. It is going to be closed after 7 days. Thanks! |
I would like to appeal once again to review which browsers version can be used to execute the current code, e.g. by checking what functions does the current codebase use. |
@dilyanpalauzov The meaning yes was used as the latest. Normally, modern browsers are automatically updated. How many users use in safari3, safari4 ? But there are still quite a few people using older IE browsers. |
Nobody knows, what JavaScript functions can be used in the code, that are available in the browsers, and which not. This leads to bloated code. E.g. currently the code uses Function.bind and according to https://caniuse.com/#feat=mdn-javascript_builtins_function_bind and https://caniuse.com/#search=indexof all browsers, which support To know what can be used in CSS and JavaScritp, and what needs hacks, one has to describe very precisely the supported browsers. Firefox before 4 and Chrome before 7 are not supported. |
It would make more sense to test all browser versions and write the correct version. The meaning of |
@dilyanpalauzov Can you register the browser compatibility part mentioned as a separate issue? |
ScheduleCreationPopup._onClickListeners() uses Function.bind since April 2018, and TimeCreationGuide._onDrag uses it since Mai 2017, so Function.bind can be used everywhere and util.bind is not necessary. • Replace util.bind(x,y) with x.bind(y) • Update README.md with the minimal supported versions.
I have changed the herein proposed changes to only substitute The discussion on documenting the minimal supported browsers in README.md is now at #666. |
ok to test |
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.
[7/27] I reviewed. :)
As of https://caniuse.com/#feat=mdn-javascript_builtins_function_bind Function.bind is supported in IE +9, Edge +12 , Firefox +4, Chrome +7, Safari +5.1.
ScheduleCreationPopup._onClickListeners() uses Function.bind since April 2018, and TimeCreationGuide._onDrag uses it since Mai 2017, so the aforementioned browser versions are required that long.
• Replace util.bind(x,y) with x.bind(y)
• Update README.md with the minimal supported versions.
Please check if the PR fulfills these requirements
fix #xxx[,#xxx]
, where "xxx" is the issue number)