Sha256: 2c7f836ce7c446d0cd0276683339b8292a4cbc8406dc31e6498a6f02b255f2fd

Contents?: true

Size: 494 Bytes

Versions: 4

Compression:

Stored size: 494 Bytes

Contents

# frozen_string_literal: true

module HoTModuLe
  # Add a couple familar DOM API features to Nokolexbor
  module QuerySelection
    # @param selector [String]
    # @return [Nokolexbor::Element]
    def query_selector(selector) = at_css(selector)

    # @param selector [String]
    # @return [Nokolexbor::Element]
    def query_selector_all(selector) = css(selector)
  end

  Nokolexbor::Element.include QuerySelection unless Nokolexbor::Element.instance_methods.include?(:query_selector)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hot_module-1.0.0.alpha14 lib/hot_module/query_selection.rb
hot_module-1.0.0.alpha13 lib/hot_module/query_selection.rb
hot_module-1.0.0.alpha12 lib/hot_module/query_selection.rb
hot_module-1.0.0.alpha11 lib/hot_module/query_selection.rb