Coder Social home page Coder Social logo

Comments (4)

Swahvay avatar Swahvay commented on September 23, 2024

So, this was originally done because we had this ideological vision of what XHP should be. Basically, each XHP component should be self-contained and no one outside that component should have visibility into what it's doing. If I were being strict I would still say this is the right way to go, and that to build things like you have above, you should put them in your XHP element so that you can just do:

$x = $this->my_xhp_code->getElementById("menu-header");
$x->prependChild(<br />);

But in reality it's a little shallow-minded to assume everyone wants these things to live in their core XHP hierarchy. Facebook made these functions public internally to support a XHP component explorer that references children. I'll make these public.

from xhp-lib.

Swahvay avatar Swahvay commented on September 23, 2024

7181bd9

from xhp-lib.

thewavelength avatar thewavelength commented on September 23, 2024

Thanks a ton! Please remember to do the same in core.php lines 23-25.

from xhp-lib.

Swahvay avatar Swahvay commented on September 23, 2024

Oops, thanks. df6b276

from xhp-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.