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.
940 941 942 |
# File 'lib/dommy/event.rb', line 940 def initialize @signal = AbortSignal.new end |
Instance Attribute Details
#signal ⇒ Object (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 |