Comments (5)
events.js needs a wrapper similar to the one in formBuilder https://github.com/kevinchappell/formBuilder/blob/master/src/js/events.js
from formeo.
Any hints how to fix it? As the events.js in formeo (where the error seems to be flagged) seems to be based on CustomEvent.
from formeo.
- To at least enable my vue app to compile, what I did was add following to utils.js:
export const createCustomEvent = (eventName, data) => {
let event;
if (typeof CustomEvent === 'function') {
event = new CustomEvent(eventName, data);
} else {
event = document.createEvent('CustomEvent');
event.initCustomEvent(eventName, true, true, data);
}
return event;
};
Wherever I see a new CustomEvent
call in the existing code (say events.js), I did this:
import {createCustomEvent} from './utils';
...
formeoSaved: createCustomEvent('formeoSaved', {}),
...
- In formeo.js I added Object.assign from Mozilla Developer Network (I temporarily disabled ESLint in the process as it doesn't allow
varArgs
and changing it to...varArgs
doesn't work due to presence of'use strict';
if (typeof Object.assign != 'function') {
// Must be writable: true, enumerable: false, configurable: true
Object.defineProperty(Object, 'assign', {
value: function assign(target, varArgs) { // .length of function is 2
'use strict';
if (target == null) { // TypeError if undefined or null
throw new TypeError('Cannot convert undefined or null to object');
}
let to = Object(target);
for (let index = 1; index < arguments.length; index++) {
let nextSource = arguments[index];
if (nextSource != null) { // Skip over if undefined or null
for (let nextKey in nextSource) {
// Avoid bugs when hasOwnProperty is shadowed
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
to[nextKey] = nextSource[nextKey];
}
}
}
}
return to;
},
writable: true,
configurable: true
});
}
- Once both done, formeo at least displayed form I loaded from memory although initially I received unspecified error at call to
window.getComputedStyle
(Invalid operation)
I am not sure what I did is correct, but my vue-base website working reasonably now.
from formeo.
great work @kokhoor
The CustomEvent polyfill and Object.assign polyfills will be added to the next release
from formeo.
Hi,
I have same problem. when will you fix that problem.
enjoy working !
from formeo.
Related Issues (20)
- window.JSON.stringify($(fbRender).formRender("userData"))???
- undefined events with angular
- Uncaught TypeError: Cannot read property 'firstChild' of undefined HOT 1
- Can i add image ?
- Panels are resized to huge height
- The preview does not match the options. HOT 3
- custom attrs dont show label on edit HOT 3
- Formeo Conditions
- is there a Formeo based solution to implement the Wizard?
- File upload example
- How can we get user input data from rendered form
- Exist the event onOpenFieldEdit like at the Formbuilder?
- Rudimentary React Example
- For anybody struggling with names on radio buttons and checkboxes HOT 1
- Rendering form with conditions not working
- Can formeo be implemented with Next.js?
- Remove Element Event
- How to integrate ckeditor in the fomeo
- Can formeo be implemented in ASP.NET mvc ?
- Formeo Date & Number elements
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 formeo.