Sha256: 7ab3bcb14b94986eb0d2f5c60b50f7e70a150887a2175cefe5afebb7b244005b

Contents?: true

Size: 156 Bytes

Versions: 3

Compression:

Stored size: 156 Bytes

Contents

# frozen_string_literal: true

# main add on
def alert(val)
  val = val.to_s
  escaped_val = val.gsub("'", "\\\\'")
  JS.eval("alert('#{escaped_val}')")
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
atome-0.5.7.6.5 lib/platform_specific/opal/extensions/object.rb
atome-0.5.7.6.0 lib/platform_specific/opal/extensions/object.rb
atome-0.5.7.5.9 lib/platform_specific/opal/extensions/object.rb