| Index: client/dart.js
|
| diff --git a/client/dart.js b/client/dart.js
|
| index c76e3fa5fad0d02620f7b0050b640179aa8c314a..1c8b333be70329f766432575e8955014a55d83ae 100644
|
| --- a/client/dart.js
|
| +++ b/client/dart.js
|
| @@ -159,11 +159,21 @@ function ReceivePortSync() {
|
|
|
| window.registerPort = function(name, port) {
|
| var stringified = JSON.stringify(serialize(port));
|
| - window.localStorage['dart-port:' + name] = stringified;
|
| + var attrName = 'dart-port:' + name;
|
| + document.documentElement.setAttribute(attrName, stringified);
|
| + // TODO(vsm): Phase out usage of localStorage. We're leaving it in
|
| + // temporarily for backwards compatibility.
|
| + window.localStorage[attrName] = stringified;
|
| };
|
|
|
| window.lookupPort = function(name) {
|
| - var stringified = window.localStorage['dart-port:' + name];
|
| + var attrName = 'dart-port:' + name;
|
| + var stringified = document.documentElement.getAttribute(attrName);
|
| + // TODO(vsm): Phase out usage of localStorage. We're leaving it in
|
| + // temporarily for backwards compatibility.
|
| + if (!stringified) {
|
| + stringified = window.localStorage[attrName];
|
| + }
|
| return deserialize(JSON.parse(stringified));
|
| };
|
|
|
|
|