Sha256: abb70020ea13baf98cdcd466841275b0105fab8a79e00612b70c8a869b8d91ed

Contents?: true

Size: 248 Bytes

Versions: 8

Compression:

Stored size: 248 Bytes

Contents

require 'opal-parser'
def require_remote(url)
  %x{
    var r = new XMLHttpRequest();
    r.overrideMimeType("text/plain"); // https://github.com/yhara/dxopal/issues/12
    r.open("GET", url, false);
    r.send('');
  }
  eval `r.responseText`
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dxopal-1.6.0 lib/dxopal/patches/require_remote.rb
dxopal-1.5.2 lib/dxopal/patches/require_remote.rb
dxopal-1.5.1 lib/dxopal/patches/require_remote.rb
dxopal-1.5.0 lib/dxopal/patches/require_remote.rb
dxopal-1.4.4 lib/dxopal/patches/require_remote.rb
dxopal-1.4.3 lib/dxopal/patches/require_remote.rb
dxopal-1.4.2 lib/dxopal/patches/require_remote.rb
dxopal-1.3.0 opal/dxopal/patches/require_remote.rb