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.

Ability to retrieve tagName

See original GitHub issue

Ideally, in jQuery’s style: $ele.prop('tagName')

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
jeremy-dentelcommented, Apr 8, 2013

You could try doing something like…

var tagName = elem[0].tagName || elem[0].name;

Should work in browser & server.

0reactions
matthewmuellercommented, Apr 8, 2013

tagName is DOM-specific. Cheerio’s internal structure has nothing to do with the DOM. If you’re looking for something that emulates the DOM, I would take a look at jQuery + JSDOM.

On Apr 7, 2013, at 10:43 PM, Kishore Nallan notifications@github.com wrote:

Thanks - yes, that indeed works. This issue is more about maintaining consistency with jQuery’s API.

— Reply to this email directly or view it on GitHub.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jQuery: Get selected element tag name - Stack Overflow
You could use $('selector').prop("tagName").toLowerCase() if you're certain that you're using a version of jQuery thats >= version 1.6.
Read more >
Get tag name using Beautifulsoup in Python - GeeksforGeeks
Syntax: tag.name. Parameters: This function doesn't accept any parameter. Implementation: Example 1: Program to extract name of a XML tag.
Read more >
AVEVA™ Historian Retrieval Guide
AVEVA™ Historian Retrieval Guide formerly Wonderware. About Data Retrieval. 12. All tag data is stored in history blocks.
Read more >
Tag Functions Overview - General Electric
The retrieves data from tags in the Historian archive, performs the calculation, and then stores the resulting values into new archive tags. Learn...
Read more >
not able to retrieve records in <script> tag in VF page
Your query is asking Salesforce for records whose Ids are equal to "cb.id" - the literal text "cb.id". You need to populate 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