All notable changes to microMVC+ are documented in this file.
Author : Fabien Conéjéro
- UMD wrapper from the start. The library works as an AMD module, a CommonJS module, and a plain browser global without requiring any build tool or module loader.
- No bundler required. The dist file is the source file.
- Element, Component, and Application are separated into clearly documented sections inside a single file.
add(id, obj, ext): registers a new element. Emits a console.warn if the id already exists.has(id): returns true if an element with the given id is registered.remove(id): unregisters and deletes an element from the component.call(path, argument): calls a method on a named element using dot-notation.publish(context, event): fires a namespaced event. Logs the call automatically.publishAsync(context, event): deferred publish that returns a Promise.subscribe(context, scope, callback): listens to an event. Returns a unique token.once(context, scope, callback): listens once, auto-removes after first trigger. Returns a token.unsubscribe(token): removes a specific subscription by token.getLog(): returns a copy of the event log array.clearLog(): empties the event log.destroy(): wipes all subscribers and the event log.
destroy(): calls destroy on all three components and resets the model state.
setState(key, value): sets a state value, publishes "state.changed" with key, value, and previous.getState(key): retrieves a state value. With no argument, returns a shallow copy of full state.resetState(): clears all state and publishes "state.reset".
publish(context, event): fires a namespaced event scoped to this element.publishAsync(context, event): async version, returns a Promise.destroy(): removes this element from its parent component.
hasOwnPropertyguard on the prototype copy loop insideadd().call()emits a console.warn if the element or method is not found.once()subscribers cleaned up in reverse order to avoid index shifting bugs.- Subscriber tokens are unique strings combining timestamp and random suffix.
- Full JSDoc on every method, written at three levels : beginner, junior dev, teacher.
- README includes a full API reference, practical examples, a feature comparison table, and a FAQ section taken word for word from a real conversation with a complete beginner.
- SECURITY.md explains the client/server trust boundary in plain language.
- CHANGELOG.md (this file).