Comments (5)
Oh yeah. I polyfill Symbol, normally, but you're right, I probably shouldn't assume it's existence here.
This code replaces symbols with strings (via .toString when setting the symbol property). It's not a polyfill, but it will get things working in IE:
if (!window.Symbol) {
(function(window){
"use strict";
var defineProperty = Object.defineProperty;
var prefix = '__symbol-' + Math.ceil(Math.random() * 1000000000) + '-';
var id = 0;
function Symbol(description) {
if (!(this instanceof Symbol)) { return new Symbol(description); }
var symbol = prefix + id++;
this._symbol = symbol;
}
defineProperty(Symbol.prototype, 'toString', {
enumerable: false,
configurable: false,
writable: false,
value: function toString() {
return this._symbol;
}
});
window.Symbol = Symbol;
}(this));
}
from jquery.event.move.
Works like a charm! Thanks!
from jquery.event.move.
@stephband i'm still getting this problem and my app is not running on IE11. could you release a solution as a commit?
i am using jquery.event.move 2.0.0 and jquery 3.3.1.
from jquery.event.move.
Oh yeah. I polyfill Symbol, normally, but you're right, I probably shouldn't assume it's existence here.
This code replaces symbols with strings (via .toString when setting the symbol property). It's not a polyfill, but it will get things working in IE:
if (!window.Symbol) { (function(window){ "use strict"; var defineProperty = Object.defineProperty; var prefix = '__symbol-' + Math.ceil(Math.random() * 1000000000) + '-'; var id = 0; function Symbol(description) { if (!(this instanceof Symbol)) { return new Symbol(description); } var symbol = prefix + id++; this._symbol = symbol; } defineProperty(Symbol.prototype, 'toString', { enumerable: false, configurable: false, writable: false, value: function toString() { return this._symbol; } }); window.Symbol = Symbol; }(this)); }
Adding this effectively disables vertical scroll in both Internet Explorer 11 Mobile and Edge Mobile (that is, the complete Windows Phone and Windows Mobile device family).
I'll never understand that obsession with the implementation of ES 2015 (and newer) functions with the only goal of rendering scripts unusable in older browsers. Please remember that not everyone can acquire a 1300 USD iPhone device to use the methods from ECMA Script 2020... it's the other way around: scripts must work in older devices whenever possible. Do not take this as a personal attack to the plugin developers, this is just a suggestion.
from jquery.event.move.
Oh yeah. I polyfill Symbol, normally, but you're right, I probably shouldn't assume it's existence here.
This code replaces symbols with strings (via .toString when setting the symbol property). It's not a polyfill, but it will get things working in IE:
if (!window.Symbol) { (function(window){ "use strict"; var defineProperty = Object.defineProperty; var prefix = '__symbol-' + Math.ceil(Math.random() * 1000000000) + '-'; var id = 0; function Symbol(description) { if (!(this instanceof Symbol)) { return new Symbol(description); } var symbol = prefix + id++; this._symbol = symbol; } defineProperty(Symbol.prototype, 'toString', { enumerable: false, configurable: false, writable: false, value: function toString() { return this._symbol; } }); window.Symbol = Symbol; }(this)); }
Where to place that code?
from jquery.event.move.
Related Issues (20)
- Firefox Mobile
- Can´t use moveend on body and expect document scrolling to work on mobile devices. HOT 4
- Use with webpack HOT 2
- Need 'movestart' on pointerdown HOT 5
- jQuery 3.0.0 breaks jQuery.event.props usage HOT 8
- move delay in mobile HOT 2
- for ... of statements break Uglify JS2 and all but the latest browers HOT 4
- Doesn't work in android stock browser 4.4.2 HOT 1
- release 2.0.0 HOT 5
- minification fails because of es6 features HOT 2
- Chrome treats document-level touch event listeners as passive by default HOT 4
- Cannot read property 'toLowerCase' of undefined
- NPM/Yarn doesn't install version 2 but always 1.3.6 HOT 2
- velocityX/Y is NaN
- Inner scroll won't work on iOS unless I remove preventDefault
- Versions 2.0.0+ broke vertical scroll in Edge Mobile
- Can't scroll over input
- Versions 2.0.0+ when add e.stopPropagation() in movestart envent is canot work
- Vulnerability checks failing on js/jquery-3.1.1.js
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 jquery.event.move.