You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by jo...@apache.org on 2011/01/05 19:50:58 UTC
svn commit: r1055579 -
/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
Author: johnh
Date: Wed Jan 5 18:50:58 2011
New Revision: 1055579
URL: http://svn.apache.org/viewvc?rev=1055579&view=rev
Log:
'/abc'[0] returns undefined on IE. Changing that to '/abc'.charAt(0)
gives us correct behavior on all browsers (IE 7, IE 8, Chrome 9, Opera
11.0 and Firefox 3.6).
Patch provided by Jun Yang.
Modified:
shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
Modified: shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js?rev=1055579&r1=1055578&r2=1055579&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/rpc/rpc.js (original)
+++ shindig/trunk/features/src/main/javascript/features/rpc/rpc.js Wed Jan 5 18:50:58 2011
@@ -377,7 +377,7 @@ if (!gadgets.rpc) { // make lib resilien
* {id: <siblingId>, origin: <siblingOrigin>} otherwise.
*/
function parseSiblingId(id) {
- if (id[0] == '/') {
+ if (id.charAt(0) == '/') {
var delimiter = id.indexOf(ID_ORIGIN_DELIMITER);
var siblingId = delimiter > 0 ? id.substring(1, delimiter) : id.substring(1);
var origin = delimiter > 0 ? id.substring(delimiter + 1) : null;
@@ -631,7 +631,7 @@ if (!gadgets.rpc) { // make lib resilien
}
function setupChildIframe(gadgetId, opt_frameurl, opt_authtoken, opt_forcesecure) {
- if (gadgetId[0] != '/') {
+ if (gadgetId.charAt(0) != '/') {
// only set up child (and not sibling) iframe
if (!gadgets.util) {
return;
@@ -812,7 +812,7 @@ if (!gadgets.rpc) { // make lib resilien
if (targetId === '..') {
from = rpcId;
- } else if (targetId[0] == '/') {
+ } else if (targetId.charAt(0) == '/') {
// sending to sibling
from = makeSiblingId(rpcId, gadgets.rpc.getOrigin(location.href));
}