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.7.5.4 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.5.3 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.5.1 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.4.8 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.4.7 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.4.6 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.4.3 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.4.2 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.3.9 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.3.6 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.3.5 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.3.3 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.3.2 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.3.1 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.3.0 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.1.8 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.1.7 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.1.0 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.0.7 lib/platform_specific/wasm/atome_wasm_extensions.rb
atome-0.5.7.0.5 lib/platform_specific/wasm/atome_wasm_extensions.rb