How Blink Work [번역]

Web IDL bindings

Web IDL bindings

자바스크립트에서 node.firstChild에 접근하면, node.h의 Node::firstChild()가 호출됩니다. 어떻게 작동하는 걸까요? 어떻게 node.firstChild가 작동하는지 살펴봅시다.

 

처음에, 스펙에 따라 IDL 파일을 정의하여야 합니다:

 

// node.idl

interface Node : EventTarget {

 [...] readonly attribute Node? firstChild;

};

 

Web IDL 구문은 Web IDL 스펙에 정의되어 있습니다. [...]는 IDL 확장 속성이라고합니다. IDL 확장 속성의 일부는 Web IDL 스펙에 정의되고 다른 속성은 Blink 특정 IDL 확장 속성입니다. Blink 특정 IDL 확장 특성을 제외하고 IDL 파일은 규격에 맞게 작성해야합니다 (즉, 사양에서 복사하여 붙여 넣기 만).

 

두 번째로, Node에 대한 C++ 클래스를 정의하고, firstChild에 대한 C++ getter를 구현해야 합니다:

 

class EventTarget : public ScriptWrappable {  // All classes exposed to JavaScript must inherit from ScriptWrappable.

 ...;

};

 

class Node : public EventTarget {

 DEFINE_WRAPPERTYPEINFO();  // All classes that have IDL files must have this macro.

 Node* firstChild() const { return first_child_; }

};
 

일반적인 경우, node.idl을 빌드하면, IDL 컴파일러는 Node 인터페이스와 Node.firstChild를 위한 블링크-V8 바인딩을 자동으로 생성합니다. 자동 생성된 바인딩은 //src/out/{Debug,Release}/gen/third_party/blink/renderer/bindings/core/v8/v8_node.h에 생성됩니다. 자바스크립트가 node.firstChild를 호출할 때, V8은 v8_node.h의 V8Node::firstChildAttributeGetterCallback()을 호출합니다. 그 다음에 위에서 정의한 Node::firstChild()를 호출합니다.

 

If you want to learn more:

 

댓글

댓글 본문
작성자
비밀번호
  1. wwwe
    http://www.yesyeezy.shop......tml
    http://www.monclerjackets.us
    http://www.filas.us.com
    http://www.coachoutletsfactory.com
    http://www.offwhitehoodie.us.com
    http://www.paulgeorgeshoes.us.com
    http://www.katespadehandbags-outlet.us.com
    http://www.supremehoodie.us.com
    http://www.yeezy700.us.com
    http://www.adidasstansmith.us.com
    http://www.goldengoose-outlet.us.com
    http://www.adidassuperstar.us.com
    http://www.yesyeezy.shop......tml
    http://www.yesyeezy.shop......tml
    http://www.yesyeezy.shop......tml
    http://www.michael-korsoutlets.us
    http://www.kobeshoes.uk
    http://www.adidasyeezys.us
    http://www.fitflops-saleclearance.us.com
    http://www.monclersoutlet.us.com
    http://www.nikeair-max.us.com
    http://www.yslhandbags.net
    http://www.adidaseqts.com
    http://www.adidasnmds.com
    http://www.nikejordans.us.com
    http://www.mbtshoesonline.com
    http://www.chromeheartsstore.us
    http://www.adidasyeezys.us.com
    http://www.nike-huarache.com
    http://www.kyrie3.us.com
    http://www.longchamphandbagsoutlets.com
    http://www.yesyeezy.shop......tml
    http://www.yeezy-shoes.us.org
    http://www.reebokoutlet.us.org
    http://www.coachoutlets.name
    http://www.airmax270.us.com
    http://www.kd11.us.com
    http://www.rolex-replica.us.com
    http://www.ferragamobelt.us.org
    http://www.yesyeezy.shop......tml
    http://www.russellwestbrookshoes.us.com
    http://www.hermesonlineshop.com
    http://www.yeezyboost-350v2.us.com
    http://www.nikeairforce1.us.com
    http://www.kobebasketballshoes.net
    http://www.curry4.us.com
    http://www.michaelkors-outletfactory.us.org
    http://www.goyard-handbags.us.com
    http://www.hermesbelts.co.uk
    http://www.bapehoodie.us
    http://www.outletmichael-kors.us.com
    http://www.nikepolo.us
    http://www.guccibelt.us.com
    http://www.jordan4.us.com
    http://www.nikehuaracheshoes.us.com
    http://www.chromehearts.com.co
    http://www.ferragamobelt.us
    http://www.michaelkors-outletstore.com
    http://www.jordan13.us.com
    http://www.jordansshoes.us.org
    http://www.adidasnmduk.com
    http://www.nikesneakers.us.com
    http://www.nike-hyperdunk.us.com
    http://www.curry4shoes.us.com
    http://www.nikecortez.us.com
    http://www.air-max.us.com
    http://www.coachoutletssale.com
    http://www.goldengoose-sneakers.com
    http://www.airmax90.us.org
    http://www.goyardhandbags.org
    http://www.goyardbags.us
    http://www.adidas-crazyexplosive.us.com
    http://www.yesyeezy.shop......tml
    http://www.adidaszxflux.com
    http://www.yeezy-500.us.com
    http://www.hermesbelts.com
    http://www.yesyeezy.shop......tml
    http://www.yeezysshoes.us.com
    http://www.michael--korsoutlet.us.org
    http://www.calvinkleinoutlet.us.com
    http://www.goldengoose-sneakers.us
    http://www.nikereact.org
    http://www.kevindurant-shoes.us.com
    http://www.yeezy-boost.us.com
    http://www.hermes-birkin.us.com
    http://www.jordan12.us.com
    http://www.kobesneakers.com
    http://www.nike-roshe.us.com
    http://www.yeezyboost.com.co
    http://www.curry5.us.com
    http://www.yeezy-shoes.org.uk
    http://www.vapormaxshoes.us
    http://www.nike-airmax2017.us.com
    http://www.longchamp-bags.us.org
    http://www.nikeflyknit.us.com
    http://www.adidasshoesonline.com
    http://www.kyrie4.org
    http://www.polosralphlaurenuk.com
    http://www.hermes-handbags.us.com
    http://www.outlettimberland.us.org
    http://www.adidasstansmith.uk
    http://www.caterpillarboots.us.com
    http://www.hoganoutletonline.us.com
    http://www.balenciagashoes.us.com
    http://www.shoesjordan.us.com
    http://www.redbottom-shoes.us.com
    http://www.outletonline-michaelkors.us.org
    http://www.off-whiteshoes.us.com
    http://www.lebronjames-shoes.us.com
    http://www.kobe-shoes.us.com
    http://www.monclerjacket.net
    http://www.vans-outlet.us.com
    http://www.yesyeezy.shop......tml
    http://www.yeezy-shoes.ca
    http://www.jimmychoo-shoes.us.com
    http://www.longchamphandbagsonlines.com
    http://www.lacostepolo.us.com
    http://www.jordan11retro.us.com
    http://www.yeezy-boost350.us.com
    http://www.jordan-retro.us.com
    http://www.adidasoutletonline.com
    http://www.canada--goose.co.uk
    http://www.kd11.us
    http://www.offwhitexjordan1.com
    http://www.asics-shoes.us.org
    http://www.yeezysuk.com
    http://www.mlbjerseys.in.net
    http://www.fakerolex.us.com
    http://www.goldengoose.us.com
    http://www.yeezyboost350v2.org.uk
    http://www.supremeclothing.us
    http://www.fila.us.org
    http://www.adidasiniki.us
    http://www.lebron16.net
    http://www.nike-shox.us.com
    http://www.retro-jordans.us.com
    http://www.yeezy-shoes.org
    http://www.goldengoosesneakers.us
    http://www.birkinbag.us.com
    http://www.lebron16.us
    http://www.filashoes.org
    http://www.outletlacoste.us.com
    http://www.yesyeezy.shop......tml
    http://www.michael-kors-handbags.org.uk
    http://www.yesyeezy.shop......tml
    http://www.chromehearts.name
    http://www.yeezyshoesuk.com
    http://www.adidasgazelle.us.com
    http://www.jordanssneakers.us.com
    http://www.nikeairmax2018.us.com
    http://www.toryburchs.us
    http://www.goyardhandbags.us.com
    http://www.fila-shoes.us.com
    http://www.yeezyboost.in.net
    http://www.nikeairmax2019.us.com
    http://www.nhljerseysshop.us.com
    http://www.adidasyeezy.co.uk
    http://www.cheapnbajerseyswholesales.us.com
    http://www.jordanshoes.org.uk
    http://www.goldengooseoutlet.us
    http://www.adidasultraboost.us.org
    http://www.lebron15.net
    http://www.yeezyboost350v2shoes.us.com
    http://www.lacostepolosshirts.com
    http://www.adidas-nmds.us.com
    http://www.balenciaga.us.com
    http://www.coachoutletstorefactory.com
    http://www.adidas-tubular.us.com
    http://www.lacosteonlineshop.us.com
    http://www.cheap-airjordans.us.com
    http://www.nikebasketballshoes.us.com
    http://www.lebron16.us.com
    http://www.kd-10.us
    http://www.jordansforcheap.us.com
    http://www.long-champ.us.com
    http://www.michael-kors-handbags.com.co
    http://www.golden-goose.us.com
    http://www.nikereact.us.com
    http://www.ultraboost.us.com
    http://www.hermeshandbags.us.org
    http://www.yeezy500.us
    http://www.offwhiteclothing.us.com
    http://www.offwhite.us.com
    http://www.michaelkorsoutletonlineus.com
    http://www.airjordanretro.uk
    http://www.linksoflondon.us.com
    http://www.jordan6.us.com
    http://www.hardenshoes.us.com
    http://www.hermes-belt.us.com
    http://www.goyard.us.com
    http://www.yeezy-boosts.us.com
    http://www.louboutinshoes.uk
    http://www.balenciagashoes.us.org
    http://www.michaelkors-outletonlines.us.com
    http://www.long-champhandbags.org.uk
    http://www.bape-hoodie.us.com
    http://www.yesyeezy.shop......tml
    http://www.converseoutlet.us.com
    http://www.nfljerseys.us.org
    http://www.coachsonline.us.com
    http://www.yesyeezy.shop......tml
    http://www.pandorabracelet.in.net
    http://www.valentinos.us.com
    http://www.yeezyboost-350.uk
    http://www.adidas-pureboost.us.com
    http://www.handbagsmichaelkors.com
    http://www.kyrieirving-shoes.us.com
    http://www.curry5.us
    http://www.michaeljordanshoes.us.com
    http://www.nikefoamposite.us.com
    http://www.yesyeezy.shop
    wwwe
graphittie 자세히 보기