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

$compile, built-in directives and jqLite not aware of owner document #3081

Open
@gschumm

Description

@gschumm

When adding angular elements to other frames or windows dynamically using $compile service a HierarchyRequestError is thrown in Internet Explorer.

Here is a simple example that demonstrates the issue:
http://plnkr.co/edit/47PFR8bJ7H58yHBmaX5S?p=preview

The problem is, that $compile, jqLite and built-in directives like ngInclude always create DOM elements (from HTML strings) in the document of the page where angular is loaded and not the document the nodes were added to. Some browsers, like Internet Explorer don't support adding nodes from a different document.

  • $compile should use the owner document of the given node and compile the rest in the context of this document.
  • jqLite should support a second argument for owner document like jQuery.
  • Built-in directives should use owner document of directive node

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions