motorcyclejs / dom

The standard DOM driver for motorcycle.js
MIT License
20 stars 2 forks source link

Options object from makeDOMDriver() #57

Closed TylorS closed 8 years ago

TylorS commented 8 years ago

Currently makeDOMDriver() accepts a container and an array of snabbdom modules to load.

makeDOMDriver('.selector', [
  require('snabbdom/modules/props'),
  require('snabbdom/modules/style')
])

I'd like to make the second parameter an optional object. i.e.

makeDOMDriver('.selector', {
  modules: [
    require('snabbdom/modules/props'),
    require('snabbdom/modules/style')
  ]
})

in order to gain flexibility in the future without the needing to further break the API. We are pre-1.0 now, and I would think it better now than later.

staltz commented 8 years ago

:+1:

We are pre-1.0 now, and I would think it better now than later.

And agreed.

TylorS commented 8 years ago

Cool, I'll make the possible changes soon. :+1: