• Mason Freed's avatar
    Add a console warning when iframe src is invalid · ec28eb86
    Mason Freed authored
    In the (corner) case that the <iframe> src attribute is relative
    to a data URL, the previous behavior was to silently fail. With
    this CL, there is now a console message indicating what happened.
    
    Example:
      <iframe id="i"></iframe>
      <script>
        let html = `<iframe src="resource.html"></iframe>`;
        i.src = `data:text/html,${encodeURIComponent(html)}`
      </script>
    
    Bug: 1033313
    Change-Id: Ie164edaacd2d92ea2bebc89419782e9204cdf410
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1972493
    Commit-Queue: Mason Freed <masonfreed@chromium.org>
    Commit-Queue: Kent Tamura <tkent@chromium.org>
    Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
    Auto-Submit: Mason Freed <masonfreed@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#726591}
    ec28eb86
opaque-base-url-expected.txt 215 Bytes