Class: Dommy::AbortController

Inherits:
Object
  • Object
show all
Defined in:
lib/dommy/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAbortController

Returns a new instance of AbortController.



940
941
942
# File 'lib/dommy/event.rb', line 940

def initialize
  @signal = AbortSignal.new
end

Instance Attribute Details

#signalObject (readonly)

Returns the value of attribute signal.



938
939
940
# File 'lib/dommy/event.rb', line 938

def signal
  @signal
end

Instance Method Details

#__js_call__(method, args) ⇒ Object



952
953
954
955
956
957
# File 'lib/dommy/event.rb', line 952

def __js_call__(method, args)
  case method
  when "abort"
    @signal.__mark_aborted__(args[0])
  end
end

#__js_get__(key) ⇒ Object



944
945
946
# File 'lib/dommy/event.rb', line 944

def __js_get__(key)
  @signal if key == "signal"
end

#__js_set__(_key, _value) ⇒ Object



948
949
950
# File 'lib/dommy/event.rb', line 948

def __js_set__(_key, _value)
  nil
end