Comments (1)
Here are the changes required to facilitate IE11 support:
- Add a polyfill for Object.assign(), e.g. right before
this.init()
on the bottom of CMS.js:
"function"!=typeof Object.assign&&(Object.assign=function(n,t){"use strict";if(null==n)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(n),e=1;e<arguments.length;e++){var o=arguments[e];if(null!=o)for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(r[c]=o[c])}return r});
The ES5 polyfills pulled in via the example pages' html do not include a Object.assign() implementation btw.
- Use a different means to trigger a hashchange event in this.init():
Replace
window.dispatchEvent(new HashChangeEvent('hashchange'));
by the following snippet
try {
window.dispatchEvent(new HashChangeEvent('hashchange'));
}
catch(e) {
window.location.hash = window.location.hash;
}
In IE new HashChangeEvent
results in "Undefined property: HashChangeEvent." and window.location.hash = window.location.hash;
won't trigger a hashchange event in e.g. Chrome, so keeping the old code in a try block seems to be a good idea.
from cms.js.
Related Issues (20)
- Allow to publish new content HOT 10
- markdown code area not correct HOT 1
- each page view requests all other pages HOT 5
- Split CMS.js file in to smaller parts HOT 9
- 1 day longer than normal
- Post list in example not displaying correct date
- Can't see any posts HOT 8
- Fix Google Crawler Issues HOT 2
- Can't put url on post metadata and pull them via the template engine HOT 2
- Gitlab Support HOT 1
- Feature Idea
- Support for websites without Indexing support HOT 6
- links replacing # with h1 due to markdown HOT 4
- null fileUrl causing errors
- Cannot read property 'split' of undefined HOT 3
- Issues trying to retrieve pages/posts file listing in SERVER mode HOT 4
- Starter project not working
- Not working in NGINX
- Please add default dark theme
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 cms.js.