Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.8 patching #1462

Merged
merged 26 commits into from
Apr 29, 2015
Merged

0.8 patching #1462

merged 26 commits into from
Apr 29, 2015

Conversation

sorvell
Copy link
Contributor

@sorvell sorvell commented Apr 29, 2015

Adds additional accessors to Polymer.dom: first/last child/ElementChild, previous/next sibling/ElementSibling, textContent, innerHTML

Adds experimental patch-dom.html import which patches dom that interacts with Shady DOM such that normal dom tree traversal and mutation api's can be used. This can enhance interoperation with 3rd party code that is not aware of Polymer.dom.

if (this.node.nodeType === Node.TEXT_NODE) {
return this.node.textContent;
} else {
return Array.prototype.map.call(this.childNodes, function(c) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.childNodes -> Polymer.dom(this).childNodes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The calling context is Polymer.dom, so this is correct.

@@ -349,6 +350,13 @@
var nativeRemoveChild = Element.prototype.removeChild;

function insertBefore(parentNode, newChild, refChild) {
if (newChild.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
console.log(parentNode, newChild, refChild);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove logging

@sorvell
Copy link
Contributor Author

sorvell commented Apr 29, 2015

@kevinpschaaf PTAL

@kevinpschaaf
Copy link
Member

LGTM

kevinpschaaf added a commit that referenced this pull request Apr 29, 2015
@kevinpschaaf kevinpschaaf merged commit db6ebd5 into 0.8-preview Apr 29, 2015
@kevinpschaaf kevinpschaaf deleted the 0.8-patching branch April 29, 2015 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants