Class: Funicular::VDOM::Patcher

Inherits:
Object
  • Object
show all
Defined in:
sig/patcher.rbs

Instance Method Summary collapse

Constructor Details

#initializePatcher

Returns a new instance of Patcher.

Parameters:

  • doc (JS::Element, nil)
  • runtime (Runtime, nil)


6
# File 'sig/patcher.rbs', line 6

def initialize: (?JS::Element? doc, ?Runtime? runtime) -> void

Instance Method Details

#applyJS::Object

apply accepts any DOM node so text-node patches (e.g. :replace) can recurse into it; Element-only operations are narrowed inside.

Parameters:

  • element (JS::Object)
  • patches (Array[patch_t])

Returns:

  • (JS::Object)


9
# File 'sig/patcher.rbs', line 9

def apply: (JS::Object element, Array[patch_t] patches) -> JS::Object