Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3441)

Unified Diff: chrome/browser/resources/uber/uber.js

Issue 2894923002: Fix dataset type conversion bug in uber.js (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/uber/uber.js
diff --git a/chrome/browser/resources/uber/uber.js b/chrome/browser/resources/uber/uber.js
index d247f79461660ab9db14759ecba71f6a7b210d34..483d475c74dcc1e744a16108efc2ffb6685de452 100644
--- a/chrome/browser/resources/uber/uber.js
+++ b/chrome/browser/resources/uber/uber.js
@@ -297,7 +297,7 @@ cr.define('uber', function() {
*/
function invokeMethodOnPage(pageId, method, opt_params) {
var frame = $(pageId).querySelector('iframe');
- if (!frame || !frame.dataset.ready) {
+ if (!frame || !frame.hasAttribute('ready')) {
queuedInvokes[pageId] = (queuedInvokes[pageId] || []);
queuedInvokes[pageId].push([method, opt_params]);
} else {
@@ -313,7 +313,7 @@ cr.define('uber', function() {
function pageReady(origin) {
var frame = getIframeFromOrigin(origin);
var container = frame.parentNode;
- frame.dataset.ready = true;
+ frame.setAttribute('ready', '');
var queue = queuedInvokes[container.id] || [];
queuedInvokes[container.id] = undefined;
for (var i = 0; i < queue.length; i++) {
@@ -345,7 +345,7 @@ cr.define('uber', function() {
// content frame is as we don't have access to its contentWindow's
// location, so just replace every time until necessary to do otherwise.
frame.contentWindow.location.replace(sourceUrl);
- frame.dataset.ready = false;
+ frame.removeAttribute('ready');
}
// If the last selected container is already showing, ignore the rest.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698