Sha256: b45e10cf7619801e6af3a80d1e62393b3f52196f8948d420665ca7e2b1b1c46c

Contents?: true

Size: 492 Bytes

Versions: 18

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true

module Heartml
  # 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

18 entries across 18 versions & 1 rubygems

Version Path
heartml-1.0.0.beta18 lib/heartml/query_selection.rb
heartml-1.0.0.beta17 lib/heartml/query_selection.rb
heartml-1.0.0.beta16 lib/heartml/query_selection.rb
heartml-1.0.0.beta15 lib/heartml/query_selection.rb
heartml-1.0.0.beta14 lib/heartml/query_selection.rb
heartml-1.0.0.beta13 lib/heartml/query_selection.rb
heartml-1.0.0.beta12 lib/heartml/query_selection.rb
heartml-1.0.0.beta11 lib/heartml/query_selection.rb
heartml-1.0.0.beta10 lib/heartml/query_selection.rb
heartml-1.0.0.beta9 lib/heartml/query_selection.rb
heartml-1.0.0.beta8 lib/heartml/query_selection.rb
heartml-1.0.0.beta7 lib/heartml/query_selection.rb
heartml-1.0.0.beta6 lib/heartml/query_selection.rb
heartml-1.0.0.beta5 lib/heartml/query_selection.rb
heartml-1.0.0.beta4 lib/heartml/query_selection.rb
heartml-1.0.0.beta3 lib/heartml/query_selection.rb
heartml-1.0.0.beta2 lib/heartml/query_selection.rb
heartml-1.0.0.beta1 lib/heartml/query_selection.rb