Class: Dommy::AbortController
- Inherits:
-
Object
- Object
- Dommy::AbortController
- Defined in:
- lib/dommy/event.rb
Instance Attribute Summary collapse
-
#signal ⇒ Object
readonly
Returns the value of attribute signal.
Instance Method Summary collapse
- #__js_call__(method, args) ⇒ Object
- #__js_get__(key) ⇒ Object
- #__js_set__(_key, _value) ⇒ Object
-
#initialize ⇒ AbortController
constructor
A new instance of AbortController.
Constructor Details
#initialize ⇒ AbortController
Returns a new instance of AbortController.
570 571 572 |
# File 'lib/dommy/event.rb', line 570 def initialize @signal = AbortSignal.new end |
Instance Attribute Details
#signal ⇒ Object (readonly)
Returns the value of attribute signal.
568 569 570 |
# File 'lib/dommy/event.rb', line 568 def signal @signal end |
Instance Method Details
#__js_call__(method, args) ⇒ Object
582 583 584 585 586 587 |
# File 'lib/dommy/event.rb', line 582 def __js_call__(method, args) case method when "abort" @signal.__mark_aborted__(args[0]) end end |
#__js_get__(key) ⇒ Object
574 575 576 |
# File 'lib/dommy/event.rb', line 574 def __js_get__(key) @signal if key == "signal" end |
#__js_set__(_key, _value) ⇒ Object
578 579 580 |
# File 'lib/dommy/event.rb', line 578 def __js_set__(_key, _value) nil end |