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.

Templates already in the dom

See original GitHub issue

If I have a template with #names that I load statically into the dom and then want to memoize the paths to with stage0 can I just modify core stage0 to have a little function that takes the content from the template or should I do something else? Also are there any performance pitfalls to be aware of in this scenario?

  function t(content) {
    content._refPaths = genPath(content);
    content.collect = walker;
    return content;
  }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mrjjwrightcommented, Jan 13, 2019

Makes sense, thanks for the quick and excellent help today on your excellent lib.

1reaction
Freak613commented, Jan 13, 2019

And yes, you need to do the same for Template nodes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What exactly is a DOM Template in Vue.js? - Stack Overflow
In the context of Vue, "DOM template" (commonly seen as "in-DOM template" in the rest of the Vue docs) refers to a component's...
Read more >
The Content Template element - HTML - MDN Web Docs
The <template> HTML element is a mechanism for holding HTML that is not to be rendered immediately when a page is loaded but...
Read more >
Template element - The Modern JavaScript Tutorial
The template content is available in its content property as a DocumentFragment – a special type of DOM node. We can treat it...
Read more >
Confused about DOM template and string template - Vue Forum
DOM Templates are those that you define inside of an actual .html file that the browser will load and open.Those are usually used...
Read more >
Data binding helper elements - Polymer Project
When handling events generated by a dom-repeat template instance, ... Changing a manager.type field should now cause the list to be re-sorted:
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