Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
release v0.7.19
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Dec 5, 2015
2 parents acdd43a + 396430f commit d2b2329
Show file tree
Hide file tree
Showing 15 changed files with 111 additions and 415 deletions.
2 changes: 1 addition & 1 deletion CustomElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
// @version 0.7.18
// @version 0.7.19
if (typeof WeakMap === "undefined") {
(function() {
var defineProperty = Object.defineProperty;
Expand Down
2 changes: 1 addition & 1 deletion CustomElements.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion HTMLImports.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
// @version 0.7.18
// @version 0.7.19
if (typeof WeakMap === "undefined") {
(function() {
var defineProperty = Object.defineProperty;
Expand Down
2 changes: 1 addition & 1 deletion HTMLImports.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MutationObserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
// @version 0.7.18
// @version 0.7.19
if (typeof WeakMap === "undefined") {
(function() {
var defineProperty = Object.defineProperty;
Expand Down
2 changes: 1 addition & 1 deletion MutationObserver.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 37 additions & 2 deletions ShadowDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
// @version 0.7.18
// @version 0.7.19
if (typeof WeakMap === "undefined") {
(function() {
var defineProperty = Object.defineProperty;
Expand Down Expand Up @@ -2741,7 +2741,7 @@ window.ShadowDOMPolyfill = {};
enumerable: true
});
}
[ "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering);
[ "focus", "getBoundingClientRect", "getClientRects", "scrollIntoView" ].forEach(methodRequiresRendering);
registerWrapper(OriginalHTMLElement, HTMLElement, document.createElement("b"));
scope.wrappers.HTMLElement = HTMLElement;
scope.getInnerHTML = getInnerHTML;
Expand Down Expand Up @@ -3364,6 +3364,7 @@ window.ShadowDOMPolyfill = {};
var setInnerHTML = scope.setInnerHTML;
var unsafeUnwrap = scope.unsafeUnwrap;
var unwrap = scope.unwrap;
var wrap = scope.wrap;
var shadowHostTable = new WeakMap();
var nextOlderShadowTreeTable = new WeakMap();
function ShadowRoot(hostWrapper) {
Expand Down Expand Up @@ -3399,6 +3400,22 @@ window.ShadowDOMPolyfill = {};
},
getSelection: function() {
return document.getSelection();
},
get activeElement() {
var unwrappedActiveElement = unwrap(this).ownerDocument.activeElement;
if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null;
var activeElement = wrap(unwrappedActiveElement);
while (!this.contains(activeElement)) {
while (activeElement.parentNode) {
activeElement = activeElement.parentNode;
}
if (activeElement.host) {
activeElement = activeElement.host;
} else {
return null;
}
}
return activeElement;
}
});
scope.wrappers.ShadowRoot = ShadowRoot;
Expand Down Expand Up @@ -4063,6 +4080,7 @@ window.ShadowDOMPolyfill = {};
var ShadowRoot = scope.wrappers.ShadowRoot;
var TreeScope = scope.TreeScope;
var cloneNode = scope.cloneNode;
var defineGetter = scope.defineGetter;
var defineWrapGetter = scope.defineWrapGetter;
var elementFromPoint = scope.elementFromPoint;
var forwardMethodsToWrapper = scope.forwardMethodsToWrapper;
Expand All @@ -4086,6 +4104,23 @@ window.ShadowDOMPolyfill = {};
defineWrapGetter(Document, "documentElement");
defineWrapGetter(Document, "body");
defineWrapGetter(Document, "head");
defineGetter(Document, "activeElement", function() {
var unwrappedActiveElement = unwrap(this).activeElement;
if (!unwrappedActiveElement || !unwrappedActiveElement.nodeType) return null;
var activeElement = wrap(unwrappedActiveElement);
while (!this.contains(activeElement)) {
var lastHost = activeElement;
while (activeElement.parentNode) {
activeElement = activeElement.parentNode;
}
if (activeElement.host) {
activeElement = activeElement.host;
} else {
return null;
}
}
return activeElement;
});
function wrapMethod(name) {
var original = document[name];
Document.prototype[name] = function() {
Expand Down
8 changes: 4 additions & 4 deletions ShadowDOM.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "webcomponentsjs",
"main": "webcomponents.js",
"version": "0.7.18",
"version": "0.7.19",
"homepage": "http://webcomponents.org",
"authors": [
"The Polymer Authors"
Expand Down
Loading

0 comments on commit d2b2329

Please sign in to comment.