-
Notifications
You must be signed in to change notification settings - Fork 373
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
Targeting bellow Microsoft Edge (<=IE11) #198
Comments
@jasny did you tested it? Because on Edge there isn't a full support, and we may get false positives. |
http://caniuse.com/#feat=promises, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
from https://github.com/jakearchibald/es6-promise/blob/master/lib/es6-promise/polyfill.js |
Can we just make an exception and check for Promise (instead of a CSS property), as @silenceisgolden suggested?
See also: http://caniuse.com/#search=promise Otherwise it will remain forever a half-complete plugin, it would be a shame! :) EDIT Even better: we could introduce JS checks in alternative to CSS checks. With a syntax such as:
it would be trivial to check |
I think it may be a very good suggestion, but I will say something said before: was it tested for older browsers? My point is: this plugin must work for very old browsers like IE6, IE7, etc (that is the point why we made it) and specially with js code must be double checked, or simply will not work and the plugin becomes useless. |
According to https://msdn.microsoft.com/en-us/library/dn802826(v=vs.94).aspx:
The only problem I see is if you use a polyfill such as https://github.com/stefanpenner/es6-promise. But you should know your code... Also, if you polyfill Promise you could always check some other object, possibilities are endless. |
I think @mjsarfatti's suggestion will work in older browsers as well, as |
Is there any solution here to prompt user to update their brower when they are using IE11 ? |
My dirty PR for this work #269 |
I use
it works for ie11 |
Since @romanlex's PR has been merged into master, can you cut a new release (1.1.6 perhaps) with it included? I would prefer to continue using a CDN, but without a versioned release I can't access the new |
@MTCoster Same for me using the v1.1.2 downloaded today from GitHub |
@MTCoster @Vardkin just use then you can wait until new release ;) |
@DominikVavra Could you please provide non-minified version (or pointer to a commit from which you've built it, if any) of the gist you've shared above? It does not seem to be working for me so I just want to understand what I'm doing wrong ... |
@DominikVavra Not sure why, but your gist doesn't seem to work... I'm getting the popup regardless if I'm on IE11, Edge or FF. Perhaps something I've done wrong? <div id="outdated" style="z-index: 999; background-color: #ae5791;"></div>
<script>
//event listener form DOM ready
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload !== 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
};
}
}
addLoadEvent(function(){
outdatedBrowser({
bgcolor: '#ae5791',
color: '#ffffff',
lowerThan: 'js:Promise', // I tried this with values 'Edge' and 'js:Promise Edge', still doesn't work
languagePath: '/lang/outdatedbrowser/en.html'
});
});
</script> The script is being loaded at the head, before this. Many thanks for the help from any. |
as our problem was with IE versions including 11 so I used a slightly modified version of @silenceisgolden 's solution with lowerThan:true . When I just check for Promise IE was throwing undefined error but typeof is safe. I tested from IE8-11 in browserstack so far seems good. var supportsPromise = typeof Promise !== "undefined" && Object.prototype.toString.call(Promise.resolve()) === '[object Promise]';
//call plugin function after DOM ready
addLoadEvent(function(){
if(false === supportsPromise) {
outdatedBrowser({
bgColor: '#f25648',
color: '#ffffff',
lowerThan: true,
languagePath: 'dependecies/outdatedbrowserlang/en.html'
})
}
}); |
so is there a working solution already? Tried a lot but nothing is working for me, I don't want to support IE11 |
Hello, Though it may not be perfect, but I use it often, as it's quite 'in-pair' with CSS custom properties, that I make use of on all my projects recently. Márton Lente |
@saltnpixels: to be extra safe use |
Will the version ever be bumped on this to include no IE11 support? |
Why not exclude IE completely? // @ts-ignore: Property documentMode does not exist
const isIE = /*@cc_on!@*/ false || !!document.documentMode; |
The code above runs for Edge too, this below prevent Edge but IE11 / IE10: |
@psntr you're right, I wasn't ware that MS apparently changed their spec of |
Maybe for the records... Using nested @media screen {
/* MSIE */
@media (min-width:123px) {
/* "new" UAs allow for nested MQ */
}
} Target EdgeHTML 12-18 which knows /* prefixed "CSS Exclusions" only implemented in Edge, IE10+ */
@supports (-ms-wrap-flow:flow) {} And there's also |
At the moment the property 'transform-style: preserve-3d' is not very reliable (there are reports of false positives in some OS/Browsers), and there is no other property that we can differentiate from Edge. So as soon there is a update on Edge of a property not supported by IE11 ( filter, object-fit, etc) we will update the plugin
The text was updated successfully, but these errors were encountered: