dommy 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dommy/animation.rb +1 -0
  3. data/lib/dommy/backend.rb +3 -0
  4. data/lib/dommy/blob.rb +6 -0
  5. data/lib/dommy/browser.rb +12 -4
  6. data/lib/dommy/character_data.rb +1 -13
  7. data/lib/dommy/cookie_store.rb +2 -1
  8. data/lib/dommy/document.rb +67 -30
  9. data/lib/dommy/element.rb +11 -0
  10. data/lib/dommy/element_internals.rb +12 -0
  11. data/lib/dommy/encodings/legacy_multibyte.rb +800 -0
  12. data/lib/dommy/encodings/multibyte_overrides.rb +76 -0
  13. data/lib/dommy/encodings/prescan.rb +234 -0
  14. data/lib/dommy/encodings.rb +121 -57
  15. data/lib/dommy/event.rb +107 -54
  16. data/lib/dommy/event_source.rb +1 -0
  17. data/lib/dommy/fetch.rb +244 -53
  18. data/lib/dommy/file_reader.rb +1 -0
  19. data/lib/dommy/form_data.rb +22 -9
  20. data/lib/dommy/form_entry_list.rb +3 -3
  21. data/lib/dommy/html_canvas_element.rb +85 -12
  22. data/lib/dommy/html_elements/base.rb +1 -0
  23. data/lib/dommy/html_elements/forms/input.rb +3 -0
  24. data/lib/dommy/html_elements/interactive.rb +56 -48
  25. data/lib/dommy/html_elements/metadata.rb +23 -0
  26. data/lib/dommy/interaction/form_submission.rb +24 -42
  27. data/lib/dommy/internal/accessibility_tree.rb +149 -162
  28. data/lib/dommy/internal/accessibility_visibility.rb +16 -17
  29. data/lib/dommy/internal/accessible_name.rb +231 -246
  30. data/lib/dommy/internal/aria_role.rb +182 -195
  31. data/lib/dommy/internal/aria_snapshot.rb +35 -38
  32. data/lib/dommy/internal/aria_state.rb +102 -118
  33. data/lib/dommy/internal/autofill.rb +75 -75
  34. data/lib/dommy/internal/backend_prefilter.rb +127 -130
  35. data/lib/dommy/internal/child_navigable.rb +86 -83
  36. data/lib/dommy/internal/close_watcher_manager.rb +1 -0
  37. data/lib/dommy/internal/css/ancestor_filter.rb +64 -64
  38. data/lib/dommy/internal/css/calc.rb +90 -71
  39. data/lib/dommy/internal/css/cascade.rb +69 -67
  40. data/lib/dommy/internal/css/color.rb +249 -187
  41. data/lib/dommy/internal/css/computed_style_builder.rb +34 -0
  42. data/lib/dommy/internal/css/computed_style_declaration.rb +50 -11
  43. data/lib/dommy/internal/css/counters.rb +67 -67
  44. data/lib/dommy/internal/css/custom_properties.rb +114 -114
  45. data/lib/dommy/internal/css/parser.rb +277 -239
  46. data/lib/dommy/internal/css/property_registry.rb +321 -302
  47. data/lib/dommy/internal/css/renderability.rb +37 -35
  48. data/lib/dommy/internal/css/rule_index.rb +2 -2
  49. data/lib/dommy/internal/css/rule_index_inputs.rb +2 -2
  50. data/lib/dommy/internal/css/supports.rb +115 -113
  51. data/lib/dommy/internal/css/ua_stylesheet.rb +55 -53
  52. data/lib/dommy/internal/css_rule_text.rb +121 -119
  53. data/lib/dommy/internal/css_source.rb +1 -3
  54. data/lib/dommy/internal/css_syntax.rb +157 -92
  55. data/lib/dommy/internal/declarative_shadow_roots.rb +1 -0
  56. data/lib/dommy/internal/directionality.rb +120 -123
  57. data/lib/dommy/internal/document_live_ranges.rb +26 -1
  58. data/lib/dommy/internal/dom_matching.rb +185 -184
  59. data/lib/dommy/internal/element_geometry.rb +8 -1
  60. data/lib/dommy/internal/element_matching.rb +71 -69
  61. data/lib/dommy/internal/element_shadow.rb +1 -13
  62. data/lib/dommy/internal/element_state.rb +255 -265
  63. data/lib/dommy/internal/event_handlers.rb +66 -64
  64. data/lib/dommy/internal/exception_report.rb +88 -86
  65. data/lib/dommy/internal/focusability.rb +205 -205
  66. data/lib/dommy/internal/global_functions.rb +49 -47
  67. data/lib/dommy/internal/idl_reflection.rb +99 -97
  68. data/lib/dommy/internal/js_number.rb +35 -33
  69. data/lib/dommy/internal/light_dismiss.rb +130 -132
  70. data/lib/dommy/internal/literal_lookup.rb +75 -75
  71. data/lib/dommy/internal/mime_type.rb +54 -49
  72. data/lib/dommy/internal/mutation_coordinator.rb +46 -0
  73. data/lib/dommy/internal/mutation_observer_microtask.rb +60 -0
  74. data/lib/dommy/internal/namespaces.rb +51 -49
  75. data/lib/dommy/internal/node_adopter.rb +25 -1
  76. data/lib/dommy/internal/node_equality.rb +61 -59
  77. data/lib/dommy/internal/post_insertion_steps.rb +1 -0
  78. data/lib/dommy/internal/referrer.rb +144 -0
  79. data/lib/dommy/internal/rendered_text/collector.rb +22 -3
  80. data/lib/dommy/internal/rendered_text/computed_box.rb +3 -2
  81. data/lib/dommy/internal/rendered_text/fragment.rb +37 -38
  82. data/lib/dommy/internal/rendered_text/items.rb +7 -5
  83. data/lib/dommy/internal/selector_matcher.rb +361 -359
  84. data/lib/dommy/internal/selector_parser.rb +74 -62
  85. data/lib/dommy/internal/sequential_focus_navigation.rb +150 -151
  86. data/lib/dommy/internal/shadow_root_registry.rb +7 -0
  87. data/lib/dommy/internal/slot_assignment.rb +117 -0
  88. data/lib/dommy/internal/slot_signals.rb +125 -0
  89. data/lib/dommy/internal/unsafe_html.rb +79 -77
  90. data/lib/dommy/internal/url_parser.rb +5 -29
  91. data/lib/dommy/internal/web_idl.rb +158 -153
  92. data/lib/dommy/internal/window_bound.rb +14 -0
  93. data/lib/dommy/internal/window_constructors.rb +3 -0
  94. data/lib/dommy/internal/xml_serialization.rb +298 -296
  95. data/lib/dommy/js/dom_interfaces.rb +13 -1
  96. data/lib/dommy/js/host_bridge.rb +23 -1
  97. data/lib/dommy/js/host_callbacks.rb +7 -0
  98. data/lib/dommy/js/host_runtime.js +625 -61
  99. data/lib/dommy/js/import_map.rb +1 -1
  100. data/lib/dommy/js/observable_runtime.js +295 -128
  101. data/lib/dommy/js/webidl_members.js +1 -1
  102. data/lib/dommy/js/webidl_signatures.js +35 -6
  103. data/lib/dommy/media_query_list.rb +1 -0
  104. data/lib/dommy/message_channel.rb +2 -0
  105. data/lib/dommy/mutation_observer.rb +25 -29
  106. data/lib/dommy/navigator.rb +4 -1
  107. data/lib/dommy/node.rb +4 -0
  108. data/lib/dommy/notification.rb +1 -0
  109. data/lib/dommy/promise.rb +12 -0
  110. data/lib/dommy/range.rb +20 -3
  111. data/lib/dommy/shadow_root.rb +25 -1
  112. data/lib/dommy/streams.rb +18 -0
  113. data/lib/dommy/style_declaration.rb +15 -4
  114. data/lib/dommy/text_codec.rb +7 -5
  115. data/lib/dommy/tree_walker.rb +68 -61
  116. data/lib/dommy/version.rb +1 -1
  117. data/lib/dommy/web_socket.rb +1 -0
  118. data/lib/dommy/window.rb +22 -4
  119. data/lib/dommy/worker.rb +1 -0
  120. data/lib/dommy/xml_http_request.rb +12 -2
  121. data/lib/dommy.rb +17 -2
  122. metadata +11 -3
@@ -66,82 +66,84 @@ module Dommy
66
66
  end
67
67
  end
68
68
 
69
- module_function
70
-
71
69
  @idl_names_by_class = {}
72
70
 
73
- # The event handler IDL attributes instances of `klass` have: those the
74
- # interfaces of its chain declare (Element's onfullscreenchange,
75
- # HTMLElement's GlobalEventHandlers, HTMLBodyElement's
76
- # WindowEventHandlers, …). A name outside them is not an event handler on
77
- # such an object (`div.onbogus`, `div.onClick`), just an expando.
78
- def idl_attribute_names(klass)
79
- @idl_names_by_class[klass] ||= Dommy::Js::DomInterfaces.class_chain(klass).each_with_object(Set.new) do |interface, names|
80
- names.merge(EventHandlerTables::BY_INTERFACE.fetch(interface, []))
81
- end.freeze
82
- end
71
+ class << self
72
+ # The event handler IDL attributes instances of `klass` have: those the
73
+ # interfaces of its chain declare (Element's onfullscreenchange,
74
+ # HTMLElement's GlobalEventHandlers, HTMLBodyElement's
75
+ # WindowEventHandlers, …). A name outside them is not an event handler on
76
+ # such an object (`div.onbogus`, `div.onClick`), just an expando.
77
+ def idl_attribute_names(klass)
78
+ @idl_names_by_class[klass] ||= Dommy::Js::DomInterfaces.class_chain(klass).each_with_object(Set.new) do |interface, names|
79
+ names.merge(EventHandlerTables::BY_INTERFACE.fetch(interface, []))
80
+ end.freeze
81
+ end
83
82
 
84
- # Whether `key` names an event handler IDL attribute of `target`.
85
- def idl_attribute?(target, key)
86
- key.is_a?(String) && key.start_with?("on") && idl_attribute_names(target.class).include?(key)
87
- end
83
+ # Whether `key` names an event handler IDL attribute of `target`.
84
+ def idl_attribute?(target, key)
85
+ key.is_a?(String) && key.start_with?("on") && idl_attribute_names(target.class).include?(key)
86
+ end
88
87
 
89
- # The event handler event type of the handler called `name` (HTML
90
- # §8.1.8.2): the name without "on", except for the four WebKit-prefixed
91
- # legacy handlers.
92
- def event_type(name)
93
- EventHandlerTables::EVENT_TYPE_OVERRIDES.fetch(name) { name.delete_prefix("on") }
94
- end
88
+ # The event handler event type of the handler called `name` (HTML
89
+ # §8.1.8.2): the name without "on", except for the four WebKit-prefixed
90
+ # legacy handlers.
91
+ def event_type(name)
92
+ EventHandlerTables::EVENT_TYPE_OVERRIDES.fetch(name) { name.delete_prefix("on") }
93
+ end
95
94
 
96
- # Whether `name` is an event handler content attribute on `element`: an
97
- # event handler of the element's interface (HTML, SVG and MathML elements
98
- # have GlobalEventHandlers; body and frameset WindowEventHandlers too)
99
- # that HTML makes a content attribute — Element's onfullscreenchange is
100
- # an IDL attribute only, and an element in no such namespace has none.
101
- def content_attribute?(element, name)
102
- CONTENT_ATTRIBUTES.include?(name) && idl_attribute_names(element.class).include?(name)
103
- end
95
+ # The attribute change steps for event handler content attributes: a
96
+ # removed attribute deactivates the handler, a set one makes its value a
97
+ # raw uncompiled handler and activates it.
98
+ def attribute_changed(element, name, value, namespace)
99
+ return unless namespace.nil? && content_attribute?(element, name)
100
+
101
+ target = target_for(element, name)
102
+ return unless target.respond_to?(:__internal_set_raw_event_handler__)
103
+
104
+ element.__internal_note_handler_attribute__(name)
105
+ event_name = event_type(name)
106
+ if value.nil?
107
+ target.__internal_deactivate_event_handler__(event_name)
108
+ else
109
+ target.__internal_set_raw_event_handler__(event_name, value, target.equal?(element) ? element : nil)
110
+ end
111
+ end
104
112
 
105
- def body_or_frameset?(element)
106
- element.is_a?(HTMLElement) && %w[body frameset].include?(element.local_name)
107
- end
113
+ # The handler content attributes an element was created with by a parser
114
+ # (which runs no attribute change steps), activated as if they had just
115
+ # been set — once per attribute.
116
+ def activate_parsed(element)
117
+ element.__internal_attribute_names__.each do |name|
118
+ next if element.__internal_handler_attribute_noted__?(name)
108
119
 
109
- # HTML "determine the target of an event handler": the Window for a
110
- # Window-reflecting handler on body/frameset, the element otherwise.
111
- def target_for(element, name)
112
- return element unless BODY_REFLECTED.include?(name) && body_or_frameset?(element)
120
+ value = element.__internal_attribute_value__(name)
121
+ attribute_changed(element, name, value, nil) unless value.nil?
122
+ end
123
+ end
113
124
 
114
- document = element.owner_document
115
- document.default_view if document.respond_to?(:default_view)
116
- end
125
+ private
117
126
 
118
- # The attribute change steps for event handler content attributes: a
119
- # removed attribute deactivates the handler, a set one makes its value a
120
- # raw uncompiled handler and activates it.
121
- def attribute_changed(element, name, value, namespace)
122
- return unless namespace.nil? && content_attribute?(element, name)
123
-
124
- target = target_for(element, name)
125
- return unless target.respond_to?(:__internal_set_raw_event_handler__)
126
-
127
- element.__internal_note_handler_attribute__(name)
128
- event_name = event_type(name)
129
- if value.nil?
130
- target.__internal_deactivate_event_handler__(event_name)
131
- else
132
- target.__internal_set_raw_event_handler__(event_name, value, target.equal?(element) ? element : nil)
127
+ # Whether `name` is an event handler content attribute on `element`: an
128
+ # event handler of the element's interface (HTML, SVG and MathML elements
129
+ # have GlobalEventHandlers; body and frameset WindowEventHandlers too)
130
+ # that HTML makes a content attribute — Element's onfullscreenchange is
131
+ # an IDL attribute only, and an element in no such namespace has none.
132
+ def content_attribute?(element, name)
133
+ CONTENT_ATTRIBUTES.include?(name) && idl_attribute_names(element.class).include?(name)
134
+ end
135
+
136
+ def body_or_frameset?(element)
137
+ element.is_a?(HTMLElement) && %w[body frameset].include?(element.local_name)
133
138
  end
134
- end
135
139
 
136
- # The handler content attributes an element was created with by a parser
137
- # (which runs no attribute change steps), activated as if they had just
138
- # been set — once per attribute.
139
- def activate_parsed(element)
140
- element.__internal_attribute_names__.each do |name|
141
- next if element.__internal_handler_attribute_noted__?(name)
140
+ # HTML "determine the target of an event handler": the Window for a
141
+ # Window-reflecting handler on body/frameset, the element otherwise.
142
+ def target_for(element, name)
143
+ return element unless BODY_REFLECTED.include?(name) && body_or_frameset?(element)
142
144
 
143
- value = element.__internal_attribute_value__(name)
144
- attribute_changed(element, name, value, nil) unless value.nil?
145
+ document = element.owner_document
146
+ document.default_view if document.respond_to?(:default_view)
145
147
  end
146
148
  end
147
149
  end
@@ -13,29 +13,6 @@ module Dommy
13
13
  # keeps every report site (event dispatch, script evaluation, a timer
14
14
  # callback, `reportError`) agreeing on what the page sees.
15
15
  module ExceptionReport
16
- module_function
17
-
18
- # The `error` value a report should expose: a ThrowValue's payload keeps
19
- # JS identity, anything else reports itself.
20
- def error_value(error)
21
- error.is_a?(Bridge::ThrowValue) ? error.value : error
22
- end
23
-
24
- # The `message` a report should expose for `error`. A JS Error proxy and a
25
- # Ruby exception both answer `message`; a thrown non-Error (a string, an
26
- # object literal) has only its string form.
27
- def message_for(error)
28
- value = error_value(error)
29
- return value.message.to_s if value.respond_to?(:message)
30
-
31
- value.to_s
32
- end
33
-
34
- # Both halves at once, for a caller that needs the pair.
35
- def describe(error)
36
- [error_value(error), message_for(error)]
37
- end
38
-
39
16
  # One JS stack frame, in either of the two forms an engine writes:
40
17
  # `at name (file:line:col)` and the anonymous `at file:line:col`.
41
18
  STACK_FRAME = /\Aat\s+(?:\S+\s+\()?(?<file>.+?):(?<line>\d+):(?<column>\d+)\)?\z/
@@ -44,79 +21,104 @@ module Dommy
44
21
  # they must not be reported as where its error happened.
45
22
  INTERNAL_SOURCES = %w[webidl_tables.js webidl_signatures.js webidl_members.js webidl_event_handlers.js host_runtime.js observable_runtime.js].freeze
46
23
 
47
- # Where the error happened, as `ErrorEvent`'s [filename, lineno, colno].
48
- # A JS engine puts its frames on the raised exception's backtrace, so the
49
- # topmost frame the PAGE owns is the position to report. Zeroes when there
50
- # is no usable frame, which is what the spec says to expose when the
51
- # position is unknown.
52
- def source_position(error)
53
- Array(error.backtrace).each do |frame|
54
- match = STACK_FRAME.match(frame.to_s.strip)
55
- next unless match
56
- next if INTERNAL_SOURCES.any? { |source| match[:file].end_with?(source) }
57
-
58
- return [match[:file], match[:line].to_i, match[:column].to_i]
59
- end
60
- ["", 0, 0]
61
- end
62
-
63
- # WHATWG "report an exception" at `window`, shaping the thrown value, its
64
- # message and its source position from whatever the entry point caught.
65
- # Every entry point reports through here, so none of them can drift from
66
- # the others in what the page gets to see. Returns whether the page
67
- # handled it.
68
- # `value` overrides what the page sees as `event.error`, for a caller that
69
- # can supply a better one than the raw catch: an engine that converted the
70
- # throw to a host exception can rebuild the JS Error the page threw, which
71
- # is the difference between a handler reading `.message` and one crashing
72
- # on `undefined`.
73
- def report_at(window, error, value: nil)
74
- value ||= error_value(error)
75
- message = message_for(error)
76
- file, line, column = source_position(error)
77
- window.__internal_report_exception__(value, message,
78
- filename: document_source(file, window), lineno: line, colno: column, host_error: error)
79
- end
80
-
81
24
  # What an engine calls source it was handed with no name of its own — an
82
25
  # inline `<script>`, an `eval`. A browser reports the document's URL for
83
26
  # those, so the placeholder is swapped for it rather than leaking an
84
27
  # engine-internal name into `ErrorEvent#filename`.
85
28
  ANONYMOUS_SOURCES = ["<code>", "<input>", "<eval>", "<anonymous>"].freeze
86
29
 
87
- def document_source(file, window)
88
- return file unless ANONYMOUS_SOURCES.include?(file)
30
+ class << self
31
+ # The `error` value a report should expose: a ThrowValue's payload keeps
32
+ # JS identity, anything else reports itself.
33
+ def error_value(error)
34
+ error.is_a?(Bridge::ThrowValue) ? error.value : error
35
+ end
89
36
 
90
- location = window.location if window.respond_to?(:location)
91
- location.respond_to?(:href) ? location.href.to_s : file
92
- end
37
+ # Where the error happened, as `ErrorEvent`'s [filename, lineno, colno].
38
+ # A JS engine puts its frames on the raised exception's backtrace, so the
39
+ # topmost frame the PAGE owns is the position to report. Zeroes when there
40
+ # is no usable frame, which is what the spec says to expose when the
41
+ # position is unknown.
42
+ def source_position(error)
43
+ Array(error.backtrace).each do |frame|
44
+ match = STACK_FRAME.match(frame.to_s.strip)
45
+ next unless match
46
+ next if INTERNAL_SOURCES.any? { |source| match[:file].end_with?(source) }
47
+
48
+ return [match[:file], match[:line].to_i, match[:column].to_i]
49
+ end
50
+ ["", 0, 0]
51
+ end
93
52
 
94
- # A host-loggable exception for a value that came straight off the bridge
95
- # with no exception attached — a rejection reason, which the engine hands
96
- # over as the JS value itself. `Bridge::ThrowValue` is that shape already:
97
- # it is raisable, keeps the value, and takes the JS frames as its backtrace
98
- # so the report can still say where the page failed.
99
- def thrown_host_error(value)
100
- return value if value.is_a?(::Exception)
101
-
102
- name = value.js_name if value.respond_to?(:js_name)
103
- text = value.to_s
104
- error = Bridge::ThrowValue.new(value, name && name != "Object" ? "#{name}: #{text}" : text)
105
- frames = value.respond_to?(:stack_frames) ? value.stack_frames : nil
106
- error.set_backtrace(frames) if frames && !frames.empty?
107
- error
108
- end
53
+ # WHATWG "report an exception" at `window`, shaping the thrown value, its
54
+ # message and its source position from whatever the entry point caught.
55
+ # Every entry point reports through here, so none of them can drift from
56
+ # the others in what the page gets to see. Returns whether the page
57
+ # handled it.
58
+ # `value` overrides what the page sees as `event.error`, for a caller that
59
+ # can supply a better one than the raw catch: an engine that converted the
60
+ # throw to a host exception can rebuild the JS Error the page threw, which
61
+ # is the difference between a handler reading `.message` and one crashing
62
+ # on `undefined`.
63
+ def report_at(window, error, value: nil)
64
+ value ||= error_value(error)
65
+ message = message_for(error)
66
+ file, line, column = source_position(error)
67
+ window.__internal_report_exception__(value, message,
68
+ filename: document_source(file, window), lineno: line, colno: column, host_error: error)
69
+ end
70
+
71
+ # A host-loggable exception for a value that came straight off the bridge
72
+ # with no exception attached — a rejection reason, which the engine hands
73
+ # over as the JS value itself. `Bridge::ThrowValue` is that shape already:
74
+ # it is raisable, keeps the value, and takes the JS frames as its backtrace
75
+ # so the report can still say where the page failed.
76
+ def thrown_host_error(value)
77
+ return value if value.is_a?(::Exception)
78
+
79
+ name = value.js_name if value.respond_to?(:js_name)
80
+ text = value.to_s
81
+ error = Bridge::ThrowValue.new(value, name && name != "Object" ? "#{name}: #{text}" : text)
82
+ frames = value.respond_to?(:stack_frames) ? value.stack_frames : nil
83
+ error.set_backtrace(frames) if frames && !frames.empty?
84
+ error
85
+ end
86
+
87
+ # The form the HOST logs. A report's `error` value is whatever the page
88
+ # threw, which for JS code is an opaque `Bridge::JSValue` with no `class` /
89
+ # `message` / backtrace — everything an error log wants. A caller that has
90
+ # the original Ruby exception passes it as `host_error`; otherwise the bare
91
+ # value is wrapped, so the log never has to special-case what it holds.
92
+ def host_form(error_value, host_error)
93
+ return host_error if host_error
94
+ return error_value if error_value.is_a?(::Exception)
95
+
96
+ Bridge::ThrowValue.new(error_value)
97
+ end
109
98
 
110
- # The form the HOST logs. A report's `error` value is whatever the page
111
- # threw, which for JS code is an opaque `Bridge::JSValue` with no `class` /
112
- # `message` / backtrace — everything an error log wants. A caller that has
113
- # the original Ruby exception passes it as `host_error`; otherwise the bare
114
- # value is wrapped, so the log never has to special-case what it holds.
115
- def host_form(error_value, host_error)
116
- return host_error if host_error
117
- return error_value if error_value.is_a?(::Exception)
99
+ private
118
100
 
119
- Bridge::ThrowValue.new(error_value)
101
+ # The `message` a report should expose for `error`. A JS Error proxy and a
102
+ # Ruby exception both answer `message`; a thrown non-Error (a string, an
103
+ # object literal) has only its string form.
104
+ def message_for(error)
105
+ value = error_value(error)
106
+ return value.message.to_s if value.respond_to?(:message)
107
+
108
+ value.to_s
109
+ end
110
+
111
+ # Both halves at once, for a caller that needs the pair.
112
+ def describe(error)
113
+ [error_value(error), message_for(error)]
114
+ end
115
+
116
+ def document_source(file, window)
117
+ return file unless ANONYMOUS_SOURCES.include?(file)
118
+
119
+ location = window.location if window.respond_to?(:location)
120
+ location.respond_to?(:href) ? location.href.to_s : file
121
+ end
120
122
  end
121
123
  end
122
124
  end