Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

8/8 master -> stable #53

Merged
merged 5 commits into from
Aug 8, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MutationObservers
18 changes: 13 additions & 5 deletions src/CustomElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,24 @@

(function(scope) {

// imports

if (!scope) {
scope = window.CustomElements = {flags:{}};
}
var flags = scope.flags;

// native document.register?

scope.hasNative = scope.flags.register && (document.webkitRegister || document.register);
if (scope.hasNative) {
var hasNative = Boolean(document.webkitRegister || document.register);
var useNative = !flags.register && hasNative;

if (useNative) {

// normalize
document.register = document.register || document.webkitRegister;

// stub
var nop = function() {};

// exports
Expand Down Expand Up @@ -88,7 +94,7 @@ if (scope.hasNative) {
// TODO(sjmiles): probably should clone inOptions instead of mutating it
var definition = inOptions || {};
if (!inName) {
// TODO(sjmiles): replace with more appropriate error (Erik can probably
// TODO(sjmiles): replace with more appropriate error (EricB can probably
// offer guidance)
throw new Error('Name argument must not be empty');
}
Expand All @@ -97,7 +103,7 @@ if (scope.hasNative) {
// must have a prototype, default to an extension of HTMLElement
// TODO(sjmiles): probably should throw if no prototype, check spec
if (!definition.prototype) {
// TODO(sjmiles): replace with more appropriate error (Erik can probably
// TODO(sjmiles): replace with more appropriate error (EricB can probably
// offer guidance)
throw new Error('Options missing required prototype property');
}
Expand Down Expand Up @@ -348,7 +354,9 @@ if (scope.hasNative) {
* @return {Element} The upgraded element.
*/
scope.upgrade = upgradeElement;

}

scope.hasNative = hasNative;
scope.useNative = useNative;

})(window.CustomElements);
2 changes: 1 addition & 1 deletion tools
Submodule tools updated 34 files
+0 −30 doc/themes/footstrap/layouts/main-handlebars.html
+2 −0 doc/themes/polymerase/.gitignore
+4 −0 doc/themes/polymerase/README.md
+78 −0 doc/themes/polymerase/assets/css/custom.css
+ doc/themes/polymerase/assets/css/external-small.png
+ doc/themes/polymerase/assets/css/logo.png
+782 −0 doc/themes/polymerase/assets/css/main.css
+ doc/themes/polymerase/assets/favicon.png
+ doc/themes/polymerase/assets/img/spinner.gif
+10 −0 doc/themes/polymerase/assets/index.html
+177 −0 doc/themes/polymerase/assets/js/yuidoc-bootstrap.js
+1,058 −0 doc/themes/polymerase/assets/vendor/bootstrap/css/bootstrap-responsive.css
+9 −0 doc/themes/polymerase/assets/vendor/bootstrap/css/bootstrap-responsive.min.css
+5,774 −0 doc/themes/polymerase/assets/vendor/bootstrap/css/bootstrap.css
+9 −0 doc/themes/polymerase/assets/vendor/bootstrap/css/bootstrap.min.css
+ doc/themes/polymerase/assets/vendor/bootstrap/img/glyphicons-halflings-white.png
+ doc/themes/polymerase/assets/vendor/bootstrap/img/glyphicons-halflings.png
+2,027 −0 doc/themes/polymerase/assets/vendor/bootstrap/js/bootstrap.js
+2 −0 doc/themes/polymerase/assets/vendor/jquery/jquery-1.8.2.min.js
+1 −0 doc/themes/polymerase/assets/vendor/prettify/prettify-min.css
+28 −0 doc/themes/polymerase/assets/vendor/prettify/prettify-min.js
+16 −0 doc/themes/polymerase/layouts/main.handlebars
+7 −0 doc/themes/polymerase/layouts/xhr.handlebars
+141 −0 doc/themes/polymerase/partials/attrs.handlebars
+206 −0 doc/themes/polymerase/partials/classes.handlebars
+137 −0 doc/themes/polymerase/partials/events.handlebars
+9 −0 doc/themes/polymerase/partials/files.handlebars
+21 −0 doc/themes/polymerase/partials/index.handlebars
+193 −0 doc/themes/polymerase/partials/method.handlebars
+95 −0 doc/themes/polymerase/partials/module.handlebars
+23 −0 doc/themes/polymerase/partials/options.handlebars
+119 −0 doc/themes/polymerase/partials/props.handlebars
+31 −0 doc/themes/polymerase/partials/sidebar.handlebars
+4 −0 doc/themes/polymerase/theme.json