Skip to content

Data URI fails with cross origin error on iPad #11

@rreusser

Description

@rreusser

Observed behavior: trying to load a data uri fails with a cross origin error on some platforms

Expected behavior: data uris load on all platforms just like any other url would

Steps to reproduce: I tried to load this data uri from glsl-numerify. With a simple resl load command passing it as the source, it works on most platforms just fine. It fails on my iPad with a cross-origin error.

Platform: iPad mini model A1432 (ca. 2012) running iOS 9.1

It seems to work fine if I remove resl and replace it with:

var digitImg = new Image();
digitImg.addEventListener('load', function () {
  ...
});
digitImg.src = require('glsl-numerify').digits.uri;

except this defeats the purpose of the annoying async loading that resl exists to prevent. It may just be that data uris should be detected and handled slightly differently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions