Sha256: a31b0aaa1b3618b7491b1e9f154008763af1b324ca0f45b23689712b655f33e1

Contents?: true

Size: 255 Bytes

Versions: 81

Compression:

Stored size: 255 Bytes

Contents

# frozen_string_literal: true

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

# dummy object to allow code parity with Opal when using Native Object with wasm
def Native(obj)
  obj
end

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
atome-0.5.6.1.4 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.6.1.1 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.6.1.0 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.6.0.4 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.6.0.3 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.6.0.2 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.9.1 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.8.7 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.8.5 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.8.1 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.7.7 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.7.5 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.7.3 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.7.1 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.7.0 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.6.9 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.6.8 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.6.7.9 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.6.6 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.5.6.5 lib/platform_specific/wasm/atome_wasm_extensions.rb