diff options
author | jiayl@chromium.org <jiayl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-07 01:01:13 +0000 |
---|---|---|
committer | jiayl@chromium.org <jiayl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-07 01:01:13 +0000 |
commit | b24f0f4a2527582d216972f10d4a9b08c68bafba (patch) | |
tree | b6e8be361cab2742af777d067d28019ea06bba1d /content/browser/resources | |
parent | 381bbf27919afe2cdbef94720ecea2c6aecf8cb5 (diff) | |
download | chromium_src-b24f0f4a2527582d216972f10d4a9b08c68bafba.zip chromium_src-b24f0f4a2527582d216972f10d4a9b08c68bafba.tar.gz chromium_src-b24f0f4a2527582d216972f10d4a9b08c68bafba.tar.bz2 |
Use an anchor tag to download the webrtc-internals log.
We used to download the log through a form submission, which is recently
changed in Chrome to have an extra "?" at the end of the URL, which triggers
a navigation instead of a download. The change seems intended and consistent
with other browsers (see the issue for more details). So I'm now using an anchor tag to work around it.
BUG=323408
Review URL: https://codereview.chromium.org/100633002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239286 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/resources')
-rw-r--r-- | content/browser/resources/media/dump_creator.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/content/browser/resources/media/dump_creator.js b/content/browser/resources/media/dump_creator.js index 5daddab..af17cf3 100644 --- a/content/browser/resources/media/dump_creator.js +++ b/content/browser/resources/media/dump_creator.js @@ -55,12 +55,12 @@ var DumpCreator = (function() { this.root_.appendChild(content); content.innerHTML = '<button disabled></button> Status: <span></span>' + - '<div><form><button>' + + '<div><a><button>' + 'Download the PeerConnection updates and stats data' + - '</button></form></div>'; + '</button></a></div>'; content.getElementsByTagName('button')[0].addEventListener( 'click', this.onRtpToggled_.bind(this)); - content.getElementsByTagName('button')[1].addEventListener( + content.getElementsByTagName('a')[0].addEventListener( 'click', this.onDownloadData_.bind(this)); this.updateDisplay_(); @@ -77,8 +77,8 @@ var DumpCreator = (function() { new Blob([JSON.stringify(peerConnectionDataStore, null, ' ')], {type: 'octet/stream'}); var URL = window.webkitURL.createObjectURL(textBlob); - this.root_.getElementsByTagName('form')[0].action = URL; - // The default action of the button will submit the form. + this.root_.getElementsByTagName('a')[0].href = URL; + // The default action of the anchor will download the URL. }, /** |