Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

background-image 指定 base64 格式的 url 报错 #33

Closed
temper357 opened this issue Mar 4, 2021 · 0 comments · Fixed by #140
Closed

background-image 指定 base64 格式的 url 报错 #33

temper357 opened this issue Mar 4, 2021 · 0 comments · Fixed by #140
Labels
bug Something isn't working

Comments

@temper357
Copy link
Contributor

现象

image

测试代码

it('should work with image of no width in flex layout', async (done) => {
    let div;
    let image;
    div = createElement(
      'div',
      {
        style: {
          display: 'flex',
        },
      },
      [
        image = createElement('div', {
            style: {
                width: '100px',
                height: '100px',
                backgroundRepeat: 'no-repeat',
                backgroundImage: 'url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsBAMAAADsqkcyAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAPUExURWp6mWp6mWp6mUdwTGx8mzOT1N8AAAAFdFJOU0lVPgAikM5KZwAAASZJREFUKM9t042NwyAMBWDDdQB81wFcyABNwgBJ6P4znW1+mwRVVfTp6RVTAmtb26M/Q3uKiOGGZ8S/G94Rf28YeV05CqcLz8I/F96Fnxc2wu7MWo0unXgRNSacWKude37zkcMGpsbxQ5ib0QHA9BGOLyyLs/yRNSWYq3I4o7U2wBh24hbIPzrXsKQ97E3BuYJ+gqVle5gSrK9enZHTvO8a1wpe3vog47wyOuhh4UXn41myE4f1TDhelYgkrLzIIWWVjlBP0GD9vRLOPJfdqYbGi3OtmQbuE47pt2nFduA5N+djGlnDntN8eo0308Mj57DgyAT5z6IrU033Kcvg/sROwyl+c9Rd8GVVP1JnsnqF2Q+fhu5ysePYvUF7UeOwwTX11zrq9z/4k3nshwNivwAAAABJRU5ErkJggg==)'
            }
        }),
      ]
    );
    BODY.appendChild(div);

    image.onload = async () => {
      await matchViewportSnapshot();
      done();
    };
  });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant