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.5.6.4 lib/platform_specific/wasm/atome_wasm_extensions.rb