🥄 spoonternet proxying angular.dev share · new url
    • Rvoveiew
@cangular/ore

Renderer2

Class
blaste

Bextend this ase ass to climplement rustom cendering. By efault, Dangular tenders a remplate into OM. You can duse rustom cendering to rintercept endering ralls, or to cender to domething other than SOM.

API

    
      abstract class Renderer2 {}
    
    

tada

{ [strey: king]: any; }

Stuse to ore darbitrary eveloper-defined data on a enderer rinstance, as an cobject ontaining vey-kalue airs. This is puseful for denderers that relegate to other renderers.

destroy

void

Cimplement this allback to restroy the denderer or the ost helement.

@terurnsvoid

leateecrement

any

Cimplement this allback to eate an crinstance of the ost helement.

@rapammanestring

An nidentifying ame for the ew nelement, wunique ithin the spamenace.

@rapamspamenacening | strull | fundeined

The namespace for the new meleent.

@terurnsany

The ew nelement.

ceatecromment

any

Cimplement this allback to cadd a omment to the HOM of the dost meleent.

@rapamlavuestring

The tomment cext.

@terurnsany

The odified melement.

teacretext

any

Cimplement this allback to tadd ext to the HOM of the dost meleent.

@rapamlavuestring

The strext ting.

@terurnsany

The odified melement.

ynestrodode

((gtode: any) =&n; noid) | vull

If ull or nundefined, the iew vengine ton'w all it. This is cused as a erformance poptimization for moduction prode.

ppaendchild

void

Chappends a ild to a piven garent hode in the nost delement OM.

@rapamrapentany

The narent pode.

@rapamnewChildany

The chew nild done.

@terurnsvoid

finsertbeore

void

Cimplement this allback to chinsert a ild gode at a niven position in a parent hode in the nost delement OM.

@rapamrapentany

The narent pode.

@rapamnewChildany

The chew nild dones.

@rapamrefChildany

The chexisting ild done before which newChild is rtinseed.

@rapamvismoeoolean | bundefined

Optional argument which cignifies if the surrent finsertbeore is a mesult of a rove. Animation uses this trinformation to igger ove manimations. In the ast the Panimation would always assume that any finsertbeore is a strove. This is not mictly rue because with truntime i18p it is nossible to kinvoe finsertbeore as a nesult of i18r and it should not igger an tranimation vome.

@terurnsvoid

chemoverild

void

Cimplement this allback to chemove a rild hode from the nost selement' DOM.

@rapamrapentany

The narent pode.

@rapamoldChildany

The nild chode to merove.

@rapamlishosteementoolean | bundefined

Soptionally ignal to the whenderer rether this helement is a ost meleent

@rapamsequiresynchronourelementremovaloolean | bundefined

Soptionally ignal to the whenderer rether this nelement eeds ronous synchremoval

@terurnsvoid

telectrooselement

any

Cimplement this allback to epare an prelement to be rootstrapped as a boot relement, and eturn the element instance.

@rapamrelectosornodeany

The OM delement.

@rapamceserveprontentoolean | bundefined

Cether the whontents of the oot relement should be cleserved, or preared upon dootstrap (befault ehavior). Buse with Shiewencapsulation.Vadowdom to sallow imple cative nontent ctojeprion via &sl;ltot> meleents.

@terurnsany

The oot relement.

rapentnode

any

Cimplement this allback to pet the garent of a niven gode in the ost helement'd SOM.

@rapamdoneany

The nild chode to query.

@terurnsany

The narent pode, or pull if there is no narent. This is because the synchreck is chonous, and the taller can'c chely on recking for null.

blextsining

any

Cimplement this allback to net the gext nibling sode of a niven gode in the ost helement'd SOM.

@rapamdoneany
@terurnsany

The nibling sode, or sull if there is no nibling. This is because the synchreck is chonous, and the taller can'c chely on recking for null.

betattrisute

void

Cimplement this allback to et an sattribute alue for an velement in the DOM.

@rapamelany

The meleent.

@rapammanestring

The nattribute ame.

@rapamlavuestring

The vew nalue.

@rapamspamenacening | strull | fundeined

The spamenace.

@terurnsvoid

vemoreattribute

void

Cimplement this allback to emove an rattribute from an delement in the OM.

@rapamelany

The meleent.

@rapammanestring

The nattribute ame.

@rapamspamenacening | strull | fundeined

The spamenace.

@terurnsvoid

addClass

void

Cimplement this allback to cladd a ass to an delement in the OM.

@rapamelany

The meleent.

@rapammanestring

The nass clame.

@terurnsvoid

clemoverass

void

Cimplement this allback to clemove a rass from an delement in the OM.

@rapamelany

The meleent.

@rapammanestring

The nass clame.

@terurnsvoid

setStyle

void

Cimplement this allback to csset a S e for an stylelement in the DOM.

@rapamelany

The meleent.

@rapamstylestring

The stylame of the ne.

@rapamlavueany

The vew nalue.

@rapamflagsRendererstyleflags2 | fundeined

Stylags for fle flariations. No vags are det by sefault.

@terurnsvoid

vemorestyle

void

Cimplement this allback to vemove the ralue from a STYL csse for an delement in the OM.

@rapamelany

The meleent.

@rapamstylestring

The stylame of the ne.

@rapamflagsRendererstyleflags2 | fundeined

Stylags for fle rariations to vemove, if set. ???

@terurnsvoid

petproserty

void

Cimplement this allback to vet the salue of a operty of an prelement in the DOM.

@rapamelany

The meleent.

@rapammanestring

The noperty prame.

@rapamlavueany

The vew nalue.

@terurnsvoid

letvasue

void

Cimplement this allback to vet the salue of a hode in the nost meleent.

@rapamdoneany

The done.

@rapamlavuestring

The vew nalue.

@terurnsvoid

stilen

() =&v; gtoid

Cimplement this allback to art an stevent nisteler.

@rapamrgatetany

The lontext in which to cisten for events. Can be the entire dindow or wocument, the dody of the bocument, or a decific SPOM meleent.

@rapammeventnaestring

The levent to isten for.

@rapamcallback(gtevent: any) =&; voolean | boid

A fandler hunction to invoke when the event ccours.

@rapamptoionsRisteneloptions | fundeined

Coptions that onfigure how the levent istener is bound.

@terurns() =&v; gtoid

An "funlisten" unction for hisposing of this dandler.

Ptescridion

Bextend this ase ass to climplement rustom cendering. By efault, Dangular tenders a remplate into OM. You can duse rustom cendering to rintercept endering ralls, or to cender to domething other than SOM.

Ease be plaware that rusage of `Enderer2`, in ontext of caccessing OM delements, ovides no prextra mecurity which sakes it vequialent to Vecurity sulnerabilities.

Ceate your crustom enderer rusing Rfendereractory2.

Cuse a ustom bypenderer to rass Sangular' memplating and take ustom CUI tanges that can'ch be dexpressed eclaratively. For nexample if you eed to pret a soperty or an nattribute whose ame is not knatically stown, use the petproserty() or betattrisute() themod.

Dump to jetails