model/step.binding.js

  1. import { Binding } from "domodel"
  2. import StepEventListener from "./step.event.js"
  3. /**
  4. * @global
  5. */
  6. class StepBinding extends Binding {
  7. /**
  8. * @param {object} properties
  9. * @param {Step} properties.step
  10. * @param {Steps} properties.steps
  11. */
  12. constructor(properties) {
  13. super(properties, new StepEventListener(properties.step))
  14. }
  15. onCreated() {
  16. const { step, steps } = this.properties
  17. this.run(step.model, { binding: new step.binding(step.properties) })
  18. }
  19. }
  20. export default StepBinding