Comments (7)
Good point. Seems switching in and out of compatibility mode changes the UA, so that would be supported, but document mode doesn't, so isn't. Would be interested to hear about possible implications of that and any workarounds you can suggest.
Hi, by the way.
from polyfill-service.
Hello :-)
DocumentMode is detectable in the DOM, we do this...
var browserType;
if ('querySelector' in document && 'localStorage' in window && 'addEventListener' in window) {
browserType = 'html5';
}
else if (
(document.documentMode && (document.documentMode < 9)) ||
(/MSIE (7)/.test(navigator.userAgent))
) {
browserType = 'legacyie';
}
We load in a slightly different JS app if its legacy IE.
It's an adaptation of our original CTM but for the interactive specials content I mostly work on now.
/t
from polyfill-service.
OK, so if you cared about that, you could sniff those things and then set the UA query param. Otherwise all we have to go on is the user agent header sent by the browser.
from polyfill-service.
Yes that would work. DocumentMode is definitely an edge case and causes IEs to behave strangely. I've stopped using conditional comments because of it as they stop reporting accurately too.
from polyfill-service.
Would you consider using this service?
from polyfill-service.
I can't speak for the whole of BBC News and I'd have to look at it more but it does sound like we're trying to address similar issues as the FT.com right now. We'll need to support at least IE8 with all of our modern JS. Speak with John Cleveley, he'll have a better idea of what is going on for the responsive news' support of IE8.
It's definitely something I'm considering for my bespoke interactives.
from polyfill-service.
Wilco. Closing this then - if we have problems in future because we need to deliver different polyfills to the same IE UA depending on what its documentMode is, we'll have to have another head-scratch.
from polyfill-service.
Related Issues (20)
- Is there an error in the judgment criteria in Object.defineProperty? HOT 4
- Feature request: support for dialog-polyfill? HOT 1
- CONTRIBUTING.md guide question / local service running HOT 5
- Fetch is wrongly polyfilled for Chrome on iOS
- SSL Certificate of polyfill.io is not trusted HOT 4
- Issue with Webview in Android 13 Version HOT 1
- Incorrect polyfills & unexpected change of behavior 2023-12-19 HOT 4
- Broken link from github repo HOT 1
- Manager
- no-version scenario changed, maybe? HOT 6
- Error loading polyfill from CDN - Cannot convert a Symbol value to a string HOT 3
- polyfill.io - 502 Bad Gateway HOT 2
- How to disclose Security Vulnerabilities HOT 4
- Polifill and google places API clash HOT 3
- Polyfill.io adding only requested features without adding additional polyfills that the browser needs
- HTML code displayed for some words in privacy policy
- Callback not returned in device simulation HOT 2
- Polyfill.io returns default feature set instead of the specified feature set when version specified first HOT 1
- Order of query parameters matter HOT 1
- ES2023: toReversed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polyfill-service.