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.

Disallow *ForDoc service lookups in element constructors

See original GitHub issue

E.g. something like this should not be allowed:

class MyElement extends AMP.BAseElement {
  constructor() {
    this.action_ = actionServiceForDoc(...);
  }
}

Suffixes to disallow:

  1. *ForDoc
  2. *ForNode

Additional request is to disallow ForDoc and ForNode APIs to be called for Document and HTMLDocumentElement types. Possible?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jridgewellcommented, Nov 1, 2019

ampdoc can’t be known until the node is connected to the document tree. The constructor is invoked much earlier than the custom-element’s connectedCallback.

0reactions
stale[bot]commented, Dec 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linter rules - Dart programming language
Class members, top-level definitions, variables, parameters, named parameters and named constructors should capitalize the first letter of each word except the ...
Read more >
Constructor is called twice - lit element - Stack Overflow
I'm going to assume <panel> and <x> are some custom elements, and that mobile is a class field since I don't see where...
Read more >
All Classes (Java SE 15 & JDK 15) - Oracle Help Center
A class that implements an empty border with no size. ... Service-provider class for DNS lookups when performing LDAP operations. LdapDnsProviderResult.
Read more >
Getting data | Firestore - Google Cloud
There are three ways to retrieve data stored in Firestore. Any of these methods can be used with documents, collections of documents, or...
Read more >
gSOAP user guide - Genivia
In this way, an automatic mapping between XML elements of the XML schema and ... is to associate a service operation name with...
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