Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Added namespace tracking to $compile #8628

Closed
wants to merge 5 commits into from

Conversation

benlesh
Copy link
Contributor

@benlesh benlesh commented Aug 15, 2014

This is in relation to #8494

Things to note:

  1. This is a work in progress.
  2. This needs cleaned up badly.
  3. The commits need flattened.
  4. etc.

Basic Idea

Added namespace tracking to the compile process.

When a namespace change is detected, it updates a namespace context object that contains methods to wrap and clone elements appropriately. There is some ugliness where the namespace context had to be ferried around via some monkey-patches to get them into the appropriate closures.

@benlesh
Copy link
Contributor Author

benlesh commented Aug 15, 2014

@mary-poppins
Copy link

I'm sorry, but I wasn't able to verify your Contributor License Agreement (CLA) signature. CLA signature is required for any code contributions to AngularJS.

Please sign our CLA and ensure that the CLA signature email address and the email address in this PR's commits match.

If you signed the CLA as a corporation, please let us know the company's name.

Thanks a bunch!

PS: If you signed the CLA in the past then most likely the email addresses don't match. Please sign the CLA again or update the email address in the commit of this PR.
PS2: If you are a Googler, please sign the CLA as well to simplify the CLA verification process.

@IgorMinar
Copy link
Contributor

here is a simplified version: https://github.com/IgorMinar/angular.js/compare/svg-transclusion

that version doesn't require passing the namespace info throughout the whole compiler but has a downside that nested transclusion during which we jump between SVG and HTML namespaces doesn't work - this means that the "should handle custom svg containers that transclude to foreignObject that transclude html" test is failing.

@benlesh
Copy link
Contributor Author

benlesh commented Aug 20, 2014

Boo! I had that one passing. :P Haha.

So I assume the problem is that when it goes to compile the transclusion
for the outer directive, the inner directive is not supplied the outer
directive's namespace context?

On Tue, Aug 19, 2014 at 11:35 PM, Igor Minar notifications@github.com
wrote:

here simplified version:
https://github.com/IgorMinar/angular.js/compare/svg-transclusion

that version doesn't require passing the namespace info throughout the
whole compiler but has a downside that nested transclusion during which we
jump between SVG and HTML namespaces doesn't work - this means that the
"should handle custom svg containers that transclude to foreignObject that
transclude html" test is failing.


Reply to this email directly or view it on GitHub
#8628 (comment).

Ben Lesh
// http://www.benlesh.com
// Twitter: @benlesh http://twitter.com/BenLesh
// Github: blesh https://github.com/blesh

@btford btford added this to the Backlog milestone Aug 20, 2014
@IgorMinar
Copy link
Contributor

closing this one in favor of #8716 which landed today

thanks for all the help Ben and please test the beta.19 that is going out right now!

@IgorMinar IgorMinar closed this Aug 22, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants