question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] $.fn.contents() supports <template />

See original GitHub issue

TODO

$.fn.contents() can return the reference of HTMLTemplateElement.prototype.content, not childNodes.

Such as how <iframe /> is supported — https://github.com/jquery/jquery/blob/1.12-stable/src/traversing.js#L144

Reference

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template#Attributes

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
mgolcommented, Dec 19, 2016

@timmywil one example - with HTML:

<template>
	<div id="template-div0">
		<div id="template-div00"></div>
	</div>
	<div id="template-div1"></div>
	<div id="template-div2"></div>
</template>

if templateNode is a what its name suggests then running:

templateNode.content.childNodes

produces a NodeList with 7 nodes:

[text, div#template-div0, text, div#template-div1, text, div#template-div2, text]
1reaction
timmywilcommented, Dec 12, 2016

@dmethvin’s comment is very sensible and hard to argue with, but I kinda want to argue with it anyway. This might be worth it. I’d like to see examples of return values.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Request Template: How to Manage Suggestions at ...
Streamline and organize user feedback with this free feature request template. Available in Google Docs and Sheets (no email required).
Read more >
Feature Request Template: How to Collect User Feedback ...
A feature request template helps you collect and organize feature requests from your customers. Feature request form allows you to listen to ...
Read more >
Fn::Join - AWS CloudFormation
The following example uses Fn::Join to construct a string value. It uses the Ref function with the AWS::Partition parameter and the AWS::AccountId pseudo ......
Read more >
Karate | Test Automation Made Simple.
readAsString() API. Here is an example of using a CSV file as the request-body: Given path 'upload' And header Content-Type = 'text/csv' And...
Read more >
Create functions - OpenFaaS
To create a new function named go-fn in Go type in the following: ... modules that require compilation then you should try the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found