From fae4081675f4f82ca6165b8a10cec43ef393a03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89tienne=20Deparis?= Date: Thu, 7 Mar 2013 11:01:18 +0100 Subject: [PATCH] E4X is not supported any more Hi! This commit fix the issues #38 and #36 --- chrome/content/repl.js | 125 +++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 60 deletions(-) diff --git a/chrome/content/repl.js b/chrome/content/repl.js index 371eb99..a78d972 100644 --- a/chrome/content/repl.js +++ b/chrome/content/repl.js @@ -719,7 +719,7 @@ var httpInspectInteractor = { var target = resolveObjectPath(repl._hostContext, path); - var content = ; + var content = document.createElement("tbody"); for(var propName in target) { var propType; try { @@ -728,23 +728,31 @@ var httpInspectInteractor = { propType = '[exception]'; } - content.appendChild( - - {propName} - {propType} - - ); + var tr = document.createElement("tr"); + tr.innerHTML = "" + propName + "" + propType + ""; + content.appendChild(tr); } var targetType = typeof(target); var targetRepresentation = target.toString(); - var breadcrumbs = ; + var breadcrumbs = document.createElement("div"); + breadcrumb.id = "breadcrumb"; + breadcrumb.innerHTML = '[root]'; var pathSteps = path.split('/'); for(let i=1; i{pathSteps[i]}); + breadcrumbs.appendChild('/'); + + var aLink = document.createElement("a"); + aLink.setAttribute( + "href", + pathSteps.slice(0,i+1).join('/') + ); + aLink.textContent = pathSteps[i]; + breadcrumbs.appendChild(aLink); } breadcrumbs.appendChild('(' + targetType + ')'); @@ -752,56 +760,53 @@ var httpInspectInteractor = { repl.print("Server: you wouldn't believe. :D"); repl.print('Content-Type: application/xhtml+xml'); repl.print(); - repl.print( - - - Meta-Browser - - - -
-

Context

- {breadcrumbs} - -

Representation

-
{targetRepresentation}
- -

Properties

- - - - - {content} -
NameType
-
- - - ); + repl.print('\ + \ + \ + Meta-Browser\ + \ + \ + \ +
\ +

Context

' + + breadcrumbs + + '

Representation

\ +
' + targetRepresentation
+                    + '
\ +

Properties

\ + \ + \ + \ + ' + content + + '
NameType
\ +
\ + \ + '); // Don't keep connection open repl.quit();