Skip to content

Commit c812975

Browse files
correct docs.
1 parent 0956efd commit c812975

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,23 +162,21 @@ The `head` object also offers callbacks for configuring head merging specifics.
162162

163163
### Plugins
164164

165-
Idiomorph supports a plugin system that allows you to extend the functionality of the library, by registering an object of callbacks:
165+
Idiomorph supports a plugin system that allows you to extend the functionality of the library, by adding an object of callbacks:
166166

167167
```js
168-
Idiomorph.registerPlugin({
168+
Idiomorph.addPlugin({
169169
name: 'logger',
170-
onBeforeNodeAdded: function(node) {
170+
beforeNodeAdded: function(node) {
171171
console.log('Node added:', node);
172172
},
173-
onBeforeNodeRemoved: function(node) {
173+
beforeNodeRemoved: function(node) {
174174
console.log('Node removed:', node);
175175
},
176176
});
177-
178-
Idiomorph.plugins // { logger: { ...} };
179177
```
180178

181-
These callbacks will be called in addition to any other callbacks that are registered in `Idiomorph.morph`. Multiple plugins can be registered.
179+
These callbacks will be called in addition to any other callbacks that are registered in `Idiomorph.morph`. Multiple plugins can be added.
182180

183181
### Setting Defaults
184182

0 commit comments

Comments
 (0)