Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

145
Views
Using renderer2 to access native element

Is there any difference in these two methods of accessing native element from security perspective?

SomeDirective implements OnInit{
  constructor(
    elementRef : ElementRef,
    renderer : Renderer2){}

 ngOnInit(){
  //method 1
  const el1 = this.elementRef.nativeElement;
  //method 2
  const el2 = this.renderer.GetRootElement(this.elementRef.nativeElement , true);
  //then use some method like this
  (el1 || el2).ScrollIntoView()
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!