16 lines
489 B
JavaScript
16 lines
489 B
JavaScript
// Generic init script for a supervised form runtime. The supervisor
|
|
// (Forum.Forms) injects two globals via QuickBEAM's :define
|
|
// option before this script runs:
|
|
//
|
|
// className: string - e.g. "Task"
|
|
// formData: object - attributes + content from the source element
|
|
//
|
|
// We build a class with the requested name that extends Form, then
|
|
// instantiate it. The instance lives for the life of this runtime.
|
|
|
|
class Form {
|
|
constructor(data) {
|
|
Object.assign(this, data);
|
|
}
|
|
}
|