Re: [webcomponents] Custom elements disconnected from a document should not be upgraded (#419)

> @domenic is there any reason for the upgrade() API to not just take a root? Is this a performance critical operation that cannot traverse descendants in all scenarios?

Two reasons, neither super-compelling:

1. IMO the { deep } option helps us expose the lower-level primitive for people who want to do something fancy, while also making it pretty easy to do the potentially-more-common case. Since this is for rare use cases anyway, allowing more flexibility makes sense to me.
2. It was easier for me to name :). `.upgrade(el)` upgrading inclusive descendants is weird. Maybe it's OK to have a long name like `.upgradeInclusiveDescendants(el)` since this is a rarely-used operation, but at that point you're not saving any characters over `.upgrade(el, { deep: true })`.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/419#issuecomment-197308797

Received on Wednesday, 16 March 2016 12:54:20 UTC