Sha256: b1a21a2708836524eeb1489965d54a9fa8a4ae2b16eca6b688ff0b51d2a0bca2

Contents?: true

Size: 415 Bytes

Versions: 6

Compression:

Stored size: 415 Bytes

Contents

module BBLib
  def self.in_opal?
    RUBY_ENGINE == 'opal'
  end

  # Used when a method is called while in the wrong engine (such as Opal)
  class WrongEngineError < StandardError; end
end

if BBLib.in_opal?
  class Element
    alias_native :replace_with, :replaceWith
    alias_native :prepend
    alias_native :insert_after, :insertAfter
    alias_native :insert_before, :insertBefore
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bblib-2.0.5 lib/bblib/core/util/opal.rb
bblib-2.0.4 lib/bblib/core/util/opal.rb
bblib-2.0.3 lib/bblib/core/util/opal.rb
bblib-2.0.1 lib/bblib/core/util/opal.rb
bblib-2.0.0 lib/bblib/core/util/opal.rb
bblib-1.0.2 lib/opal/bbopal.rb