polyfills

Angular on IE 11 intranet - programmatically disable Compatibility View

£可爱£侵袭症+ 提交于 2019-12-24 11:36:11
问题 I'm running an Angular 6 app on company intranet via IE11 . My app compiles to ES5 according to tscnfig.json . I've uncommented and installed all of the IE compatibility lines in polyfills.js . I've also added the suggested meta tag <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> just below my <head> tag. None of this had had the intended behavior of programmatically disabling IE's default Compatibility View settings. By default, IE11 displays intranet sites in Compatibility View ,

Blank page and “Unknown name” error in vue.esm.js (Microsoft IE 11 and Microsoft Edge)

≡放荡痞女 提交于 2019-12-24 10:12:58
问题 Internet Explorer 11 and Microsoft Edge shows me a blank page when loading my Vue app. Console logs shows an "Unknown name" error pointing to the line "throw e" in vue.esm.js: Watcher.prototype.get = function get () { pushTarget(this); var value; var vm = this.vm; try { value = this.getter.call(vm, vm); } catch (e) { if (this.user) { handleError(e,vm, ("getter for watcher \"" + (this.expression) + "\"")); } else { throw e // UNKNOWN NAME ERROR (IE and Edge) } } finally { // "touch every

Polyfill/fix for using dot notation on reserved JS words like 'function'

a 夏天 提交于 2019-12-24 08:37:08
问题 This question is a followup of this Background: var a = function(){ console.log("function is() initialized"); }; // assign a property named 'function' to function 'a' a.function = function afunction(f){ return (typeof f === 'function'? true: false); }; // Use our is function to test if a given variable is a function a.function(a); // IE throws 'expected identifier' error v/s Chrome correctly outputs "true" Solution Use bracket notation to avoid interference as described here i.e. a["function"

Polymer 2.0 webcomponents-loader.js is missing Edge polyfill

给你一囗甜甜゛ 提交于 2019-12-24 05:09:12
问题 We currently updated a project from Polymer 1 to the Polymer 2/ hybrid version. I know that webcomponents-hi-sd-ce.js is the polyfill for edge. When testing the page on Microsoft Edge I now get an error indicating that webcomponents-hi-sd-ce.js.map could not be found (404). The same error occurs when loading the project with webcomponents-lite.js I couldn't find similar cases so I figured this might be a issue in Polymer 2. I tried importing the script directly by myself but that didn't help

respond.js polyfill not working for last media query in IE8

微笑、不失礼 提交于 2019-12-23 18:30:53
问题 I have two media queries in my css (not counting the print one) : @media screen and (min-width: 720px) {} and @media screen and (min-width: 1026px) { I am using respond.js to get them to behave under IE8. The weird thing is that it works perfectly, except for the last media query where it reverts back to the css before the media queries. I.e., it works well until the window hits that 1026px threshold in width. Anybody got an idea as to what is going on there ? Here is the link to the preview

How to add flatMap using babel 7?

≯℡__Kan透↙ 提交于 2019-12-23 07:47:14
问题 After reading the article Removing Babel's Stage Presets by babel , I still not fully understand how to add a proposal from, for example, stage-3 (flatMap) to .babelrc . As far as I understand, because flatMap can be written in ES5, then I need a polyfill and not a plugin. I installed @babel/polyfill under --save-dev but the browser still tells me that this method doesn't exist. I guess that @babel/polyfill doesn't cover experimental features. 回答1: flatMap was removed from @babel/polyfill for

Is there a polyfill for link download with data uri?

大憨熊 提交于 2019-12-23 02:41:18
问题 I have some code should be generated by the server: <a download="test.csv" href="data:text/plain;charset=utf-8;base64,w4FydsOtenTFsXLFkXTDvGvDtnJmw7p0w7Nnw6lwLg=="> teszt </a> It works with current chrome, firefox, opera. I'd like it to support MSIE11. Afaik msSaveBlob is the solution for that. Is there an existing js polyfill I could use, or should I write it? 回答1: Okay I made a simple polyfill based on the code I found in SO answers and here. I tested it on MSIE11, it works. It does not

Why do console.log() polyfills not use Function.apply()?

好久不见. 提交于 2019-12-22 05:06:16
问题 I've been looking at some of the popular console.log() wrappers/polyfills: Paul Irish's Ben Alman's Craig Patik's I notice that all of them accept multiple arguments , but they all do something like this: console.log(arguments); Which results in output like this (in Chrome): Whereas, at least in a modern browser like Chrome or Firefox, console.log() also accepts multiple arguments, so that this would produce (IMHO) superior output: console.log.apply(console, arguments) Which results in output

How do I use babel's `useBuiltIns: 'usage'` option on the vendors bundle?

北城余情 提交于 2019-12-20 10:49:10
问题 Since I need to support also IE11, I need to transpile also node_modules . This is the babel config I use on the node_modules: presets: [ ['@babel/preset-env', { modules: false, useBuiltIns: 'usage' }], ], I use the useBuiltIns options because it was giving an error Symbol is not defined , the polyfill was needed. However this configuration breaks at compile time, supposedly because it injects some imports in the code, here is the error: Basically it's not liking the module.exports . So how

Polyfill for css :target, not(), and [tilde] sibling selectors?

拟墨画扇 提交于 2019-12-20 02:48:09
问题 I'd like to start using the css :target, not() and ~ sibling selectors now. Is there a polyfill or some other solution for these? I'd prefer to be able to simply use the css for them over using js/jQuery to simulate them for every use. 回答1: IE9.js polyfills everything you're looking for. http://ie7-js.googlecode.com/svn/test/index.html 回答2: This one also does the work: http://selectivizr.com/ 来源: https://stackoverflow.com/questions/6190456/polyfill-for-css-target-not-and-tilde-sibling