envjs 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.3.5 / 2010-05-19
2
+
3
+ * dont remove the gemspec so it can be used via gh (though not commited ... ?)
4
+ * Handle location on external redirects
5
+ * weird table issue; commented out upstream so ...
6
+
1
7
  === 0.3.4 / 2010-04-22
2
8
 
3
9
  * Hack file prot urls with hash change (for now); add hash change test
data/lib/envjs.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Envjs
2
2
 
3
- VERSION = "0.3.4"
3
+ VERSION = "0.3.5"
4
4
 
5
5
  def self.js_exception_stack e
6
6
  result = %(Exception: )+e.to_s
data/lib/envjs/env.js CHANGED
@@ -1839,6 +1839,9 @@ $implementation.errorChecking = false;
1839
1839
  $debug("Initializing Window Location.");
1840
1840
  //the current location
1841
1841
  var $location = '';
1842
+ $env.__url = function(url){
1843
+ $location = url;
1844
+ };
1842
1845
 
1843
1846
  $w.__defineSetter__("location", function(url){
1844
1847
  if (false) {
data/lib/envjs/static.js CHANGED
@@ -3670,7 +3670,7 @@ __extend__(DOMDocument.prototype, {
3670
3670
  "</body></html>");
3671
3671
  } else {
3672
3672
  try{
3673
- _this.loadXML(xhr.responseText);
3673
+ _this.loadXML(xhr.responseText, xhr.__url);
3674
3674
  _this.__original_text__ = xhr.responseText;
3675
3675
  if(xhr.responseHeaders && xhr.responseHeaders["set-cookie"]) {
3676
3676
  try {
@@ -4077,7 +4077,12 @@ var HTMLDocument = function(implementation, docParentWindow, docReferrer) {
4077
4077
  };
4078
4078
  HTMLDocument.prototype = new DOMDocument;
4079
4079
  __extend__(HTMLDocument.prototype, {
4080
- loadXML : function(xmlString) {
4080
+ loadXML : function(xmlString, url) {
4081
+ if (url) {
4082
+ var $env = this._parentWindow.$envx;
4083
+ $env.__url(url);
4084
+ }
4085
+
4081
4086
  // create DOM Document
4082
4087
  /*
4083
4088
  if(this === $document){
@@ -7376,6 +7381,7 @@ var HTMLTableSectionElement = function(ownerDocument) {
7376
7381
  HTMLTableSectionElement.prototype = new HTMLElement;
7377
7382
  __extend__(HTMLTableSectionElement.prototype, {
7378
7383
 
7384
+ /* commented out upstream
7379
7385
  appendChild : function (child) {
7380
7386
 
7381
7387
  // disallow nesting of these elements.
@@ -7385,7 +7391,7 @@ __extend__(HTMLTableSectionElement.prototype, {
7385
7391
  return DOMNode.prototype.appendChild.apply(this, arguments);
7386
7392
  }
7387
7393
 
7388
- },
7394
+ }, */
7389
7395
 
7390
7396
  get align() {
7391
7397
  return this.getAttribute("align");
data/src/dom/document.js CHANGED
@@ -167,7 +167,7 @@ __extend__(DOMDocument.prototype, {
167
167
  "</body></html>");
168
168
  } else {
169
169
  try{
170
- _this.loadXML(xhr.responseText);
170
+ _this.loadXML(xhr.responseText, xhr.__url);
171
171
  _this.__original_text__ = xhr.responseText;
172
172
  if(xhr.responseHeaders && xhr.responseHeaders["set-cookie"]) {
173
173
  try {
data/src/html/document.js CHANGED
@@ -19,7 +19,12 @@ var HTMLDocument = function(implementation, docParentWindow, docReferrer) {
19
19
  };
20
20
  HTMLDocument.prototype = new DOMDocument;
21
21
  __extend__(HTMLDocument.prototype, {
22
- loadXML : function(xmlString) {
22
+ loadXML : function(xmlString, url) {
23
+ if (url) {
24
+ var $env = this._parentWindow.$envx;
25
+ $env.__url(url);
26
+ }
27
+
23
28
  // create DOM Document
24
29
  /*
25
30
  if(this === $document){
@@ -10,6 +10,7 @@ var HTMLTableSectionElement = function(ownerDocument) {
10
10
  HTMLTableSectionElement.prototype = new HTMLElement;
11
11
  __extend__(HTMLTableSectionElement.prototype, {
12
12
 
13
+ /* commented out upstream
13
14
  appendChild : function (child) {
14
15
 
15
16
  // disallow nesting of these elements.
@@ -19,7 +20,7 @@ __extend__(HTMLTableSectionElement.prototype, {
19
20
  return DOMNode.prototype.appendChild.apply(this, arguments);
20
21
  }
21
22
 
22
- },
23
+ }, */
23
24
 
24
25
  get align() {
25
26
  return this.getAttribute("align");
@@ -5,6 +5,9 @@
5
5
  $debug("Initializing Window Location.");
6
6
  //the current location
7
7
  var $location = '';
8
+ $env.__url = function(url){
9
+ $location = url;
10
+ };
8
11
 
9
12
  $w.__defineSetter__("location", function(url){
10
13
  if (false) {
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 4
9
- version: 0.3.4
8
+ - 5
9
+ version: 0.3.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Resig
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-04-22 00:00:00 -07:00
19
+ date: 2010-05-19 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency