Changeset 213
- Timestamp:
- 07/08/10 15:55:45 (2 months ago)
- Location:
- xmvc/branches/remove-namespaces
- Files:
-
- 3 modified
-
example.js (modified) (1 diff)
-
src/main/javascript/compat/javeline_xpath.js (modified) (1 diff)
-
src/main/javascript/xmvc/controller.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
xmvc/branches/remove-namespaces/example.js
r205 r213 44 44 function Greeter () { 45 45 this.hello = function (observer, ctx) { 46 var fragment = document.createElement("nothing") 47 observer.notify(fragment) 46 var newdoc = Sarissa.getDomDocument( 47 "http://example.com/", "nothing" 48 ) 49 observer.notify(newdoc) 48 50 } 49 51 -
xmvc/branches/remove-namespaces/src/main/javascript/compat/javeline_xpath.js
r201 r213 431 431 } 432 432 } 433 if(IS_IE){ 434 HTMLDocument.prototype.selectNodes = 435 HTMLElement.prototype.selectNodes = function(sExpr, contextNode){ 436 return XPath.selectNodes(sExpr, contextNode || this); 437 } 438 HTMLDocument.prototype.selectSingleNode = 439 HTMLElement.prototype.selectSingleNode = function(sExpr, contextNode){ 440 return XPath.selectNodes(sExpr, contextNode || this)[0]; // This could be optimized in the XPath object 441 } 442 } -
xmvc/branches/remove-namespaces/src/main/javascript/xmvc/controller.js
r212 r213 477 477 478 478 return matches.singleNodeValue 479 } 480 else if (document.selectSingleNode) { 481 return (context || controller.document).selectSingleNode( 482 expression, resolver 483 ) 484 } 485 else if (XPath.selectNodes) { 486 return XPath.selectNodes(expression, context)[0] 479 487 } 480 488 } … … 498 506 results.push(matches.snapshotItem(i)) 499 507 } 508 } 509 else if (document.selectNodes) { 510 results = (context || controller.document).selectNodes( 511 expression, resolver 512 ) 513 } 514 else if (XPath.selectNodes) { 515 results = XPath.selectNodes(expression, context) 500 516 } 501 517