Side navigation
#13742 closed bug (notabug)
Opened April 07, 2013 10:39AM UTC
Closed April 15, 2013 04:26PM UTC
jQuery.parseHTML() - "context" argument not working
Reported by: | GolubevS79@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The following scenario not working:
<form id="main"> </form> <script> var elems = jQuery.parseHTML("<input>", document.getElementById("main")); $("#main").append(elems); </script>
Error is thrown because the function createElement() is called on "Node" object (not "document"). In case of more complex HTML function createDocumentFragment() on "Node" object is called. In short, expected only "document" object.
What does the argument "context"? In what scenario it can be useful? As I understand the documentation, result should be added to the "context" after method call in any case.
Attachments (0)
Change History (1)
Changed April 15, 2013 04:26PM UTC by comment:1
resolution: | → notabug |
---|---|
status: | new → closed |
Ported to docs issue: https://github.com/jquery/api.jquery.com/issues/281