polyfills

Polymer 1.0 on firefox ReferenceError: Polymer is not defined

心已入冬 提交于 2019-12-20 02:18:06
问题 Hello I have a working Polymer 1.0 web page on Chrome and Opera. Now I need the page to run in Firefox and Safari. I have the following test: <!DOCTYPE html> <html> <head> <?php use Cake\Routing\Router; ?> <?php echo $this->Html->script('/bower_components/webcomponentsjs/webcomponents-lite.min.js'); ?> <link rel="import" href="<?= Router::url('/'); ?>bower_components/polymer/polymer.html"> <dom-module id="test-element"> <template > <h1>It works</h1> </template> <script> Polymer({ is: "test

Polymer 1.0 on firefox ReferenceError: Polymer is not defined

大兔子大兔子 提交于 2019-12-20 02:18:05
问题 Hello I have a working Polymer 1.0 web page on Chrome and Opera. Now I need the page to run in Firefox and Safari. I have the following test: <!DOCTYPE html> <html> <head> <?php use Cake\Routing\Router; ?> <?php echo $this->Html->script('/bower_components/webcomponentsjs/webcomponents-lite.min.js'); ?> <link rel="import" href="<?= Router::url('/'); ?>bower_components/polymer/polymer.html"> <dom-module id="test-element"> <template > <h1>It works</h1> </template> <script> Polymer({ is: "test

IE input event for contenteditable?

心已入冬 提交于 2019-12-19 17:24:59
问题 I am wondering if there is a polyfill to support the contenteditable input event in IE11 ? I am specifically talking about this event: http://jsfiddle.net/ch6yn/ Which fires whenever a change happens on a contenteditable div regardless of the source (e.g. copy/paste/drag/drop/type etc). <div contenteditable="true" id="editor">Please type something in here</div> <script> document.getElementById("editor").addEventListener("input", function() { alert("input event fired"); }, false); </script>

How do I make Object.entries available in TypeScript? [duplicate]

∥☆過路亽.° 提交于 2019-12-19 12:52:16
问题 This question already has answers here : ES7 Object.entries() in TypeScript not working (3 answers) Closed 2 years ago . In my angular-cli-built app (which is currently using TypeScript 2.0.3) I want to be able to use this decomposition-based iterator: for (let [key, value] of Object.entries(obj)) { } What do I have to do in order to have it recognized: upgrade TypeScript? use a polyfill? if so: how do I import it - in individual .ts files or in a config file to make it globally available?

Template tag polyfill for IE 11 - not working with table tr and td

99封情书 提交于 2019-12-19 08:58:19
问题 I work with polyfill js that allows to process tags for browsers that does not support it. Source code of polyfill on jsfiddle Source question But I've noticed that in IE 11 this polyfill fails to work with templates that include <tr> and <td> tags My sample on jsfiddle The problem is that when we try to get childNodes from template tag node elPlate.childNodes it returns everything but <tr> and <td> children as if there were no such tags inside <template> . Am I missing something? Is there

Why is the Temp.prototype on the MDN Object.create polyfill set to null?

烈酒焚心 提交于 2019-12-19 04:23:10
问题 Why does the MDN polyfill for Object.create have the following line: Temp.prototype = null; Is it so that we avoid maintaining a reference to the prototype argument enabling faster garbage collection? The polyfill: if (typeof Object.create != 'function') { Object.create = (function() { var Temp = function() {}; return function (prototype) { if (arguments.length > 1) { throw Error('Second argument not supported'); } if (typeof prototype != 'object') { throw TypeError('Argument must be an

Getting Error Promise is undefined in IE11

淺唱寂寞╮ 提交于 2019-12-18 11:42:27
问题 I am converting React code to typescript, target in tsconfig is es5. on running in IE 11 i get an error "Promise is undefined" I know i need to polyfill,but how? I am not using Babel. Following is my Webpack.config var webpack = require("webpack"); var Promise = require('es6-promise').Promise; var paths = require('./config/paths'); var HtmlWebpackPlugin = require('html-webpack-plugin'); //var InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin'); var AureliaWebpackPlugin =

angular 5 application is working on edge but failing on ie11

回眸只為那壹抹淺笑 提交于 2019-12-14 02:29:57
问题 My angular 5 application which is running on angular cli is not working on ie11. What makes me wonder is the application is fine on edge. I have my ployfills set for both ie and edge. On ie11 application is throwing 'ERROR TypeError: Object doesn't support property or method' errors. Please look at my ployfills.ts, tsConfig and angular-cli and let me know what is missing. I tried commenting web-animations polyfills but no luck. polyfill.ts /** * This file includes polyfills needed by Angular

Whats the best JSON JavaScript polyfill

自古美人都是妖i 提交于 2019-12-13 21:40:45
问题 I am looking for a JSON polyfill (for JSON support in older browsers) that I can use in some JavaScript I'm writing. I've looked and found JSON2 and JSON3 are quite popular and I've read that JSON3 is meant to be a drop in replacement for JSON2 but I was wondering if these are the best polyfills out there? The only problem I have with JSON3 is that when I run the google closure lint checks over the JSON3 library it complains about for loops not defining a body: If this if/for/while really

Useless function in Google Analytics?

断了今生、忘了曾经 提交于 2019-12-13 19:05:26
问题 I was looking through Google Analytics, and I came across this function (pretty-printed for readability): ha = function(a) { var b = []; if (Array.prototype.indexOf) return a = b.indexOf(a), "number" == typeof a ? a : -1; for (var c = 0; c < b.length; c++) if (b[c] === a) return c; return -1 }, This looks like an Array.prototype.indexOf polyfill. Trouble is, instead of the var b = this; you'd expect, there is instead var b = []; . I can't find any circumstance in which this would not return