Skip to content

Commit

Permalink
* builder.php
Browse files Browse the repository at this point in the history
  - Generate cache-controlling header fields

* dom/css.js
  - Auto-import dependencies (EXPERIMENTAL)

* dom/css/color.js
  - Distributed under GPLv3
  - Use strict mode
  - Auto-import dependencies (EXPERIMENTAL)
  - jsx.dom.css.Color(): Fixed parameter names
  - Added jsx.dom.css.Color.MIN_VALUE, .MAX_VALUE
  - Fixed jsx.dom.css.Color.prototype.hsv2rgb() and made it
    static, calling new jsx.dom.css.HSVColor.prototype.toRGB()
  - Use Function.prototype.extend() from (smaller footprint)
  - Added jsx.dom.css.HSVColor, .HSLColor
  - Fixed JSdoc
  - Added SVN keywords

* grammar.js
  - Added experimental jsx.grammar.Grammar2
  - Added test case (test/grammar.html)

* http.js
  - Never fetch resources from HTTP/1.1 caches (up-to-date, but slower; FIXME)

* float.js
  - Fixed bogus isArray() call with jsx.object.isArray()

* object.js
  - Added jsx.absPath()
  - jsx.importFrom():
    + Stores URI of last import, for auto-imports
    + Supports document.head from HTML5 WD

* string.js
  - Copied leadingZero to jsx.string namespace
  - Fixed obsolete pad() calls with jsx.string.pad()

* test/object.html
  - Include http.js to test jsx.importFrom()
  • Loading branch information
PointedEars committed Jun 25, 2012
1 parent 605a33b commit a6f963c
Show file tree
Hide file tree
Showing 10 changed files with 1,126 additions and 493 deletions.
11 changes: 10 additions & 1 deletion builder.php
Expand Up @@ -386,7 +386,16 @@ protected function resolveDeps()

public function output()
{
header("Content-Type: {$this->contentType}");
header('Content-Type: ' . $this->contentType);

header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');

/* Cached resource expires in HTTP/1.1 caches 24h after last retrieval */
header('Cache-Control: max-age=86400, s-maxage=86400, must-revalidate, proxy-revalidate');

/* Cached resource expires in HTTP/1.0 caches 24h after last retrieval */
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 86400) . ' GMT');

$prefix = $this->prefix;

// $this->resolveDeps();
Expand Down
15 changes: 11 additions & 4 deletions dom/css.js
Expand Up @@ -34,10 +34,17 @@ if (typeof jsx == "undefined")

if (typeof jsx.dom == "undefined")
{
/**
* @namespace
*/
jsx.dom = {};
if (typeof jsx.importFrom == "function")
{
jsx.importFrom(jsx.absPath("../dom.js", jsx.importFrom.lastImport));
}
else
{
/**
* @namespace
*/
jsx.dom = {};
}
}

/**
Expand Down

0 comments on commit a6f963c

Please sign in to comment.