mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: polyfill intersection observer for IE11 / iOS Safari
This feature is used for defer loading of images and in future for post cloaking This gives us a polyfill so we can safely use the feature in problem browsers The polyfill supports "polling" but it does not appear we need it yet. If we discover anything odd here, consider setting poll interval per: https://github.com/w3c/IntersectionObserver/tree/master/polyfill ``` var io = new IntersectionObserver(callback); io.POLL_INTERVAL = 100; // Time in milliseconds. ``` Keeping the mutation observer cause we often mutate the DOM
This commit is contained in:
parent
e564fe1866
commit
0ca61242b8
5 changed files with 737 additions and 1 deletions
|
@ -56,7 +56,7 @@ task 'javascript:update' do
|
|||
}, {
|
||||
source: 'jquery.cookie/jquery.cookie.js'
|
||||
}, {
|
||||
source: 'jQuery/dist/jquery.js'
|
||||
source: 'jquery/dist/jquery.js'
|
||||
}, {
|
||||
source: 'jquery-tags-input/src/jquery.tagsinput.js'
|
||||
}, {
|
||||
|
@ -65,6 +65,9 @@ task 'javascript:update' do
|
|||
source: 'mousetrap/mousetrap.js'
|
||||
}, {
|
||||
source: 'resumablejs/resumable.js'
|
||||
}, {
|
||||
# TODO: drop when we eventually drop IE11, this will land in iOS in version 13
|
||||
source: 'intersection-observer/intersection-observer.js'
|
||||
}
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue