Code Monkey home page Code Monkey logo

Comments (1)

jeffpar avatar jeffpar commented on June 9, 2024

Would that save much? Every machine XML file refers in turn to ROM images (and usually 1 or more disk images) that must be preloaded before the machine can be allowed to start. How are you envisioning those resources being stored and supplied to embedXXX()?

The XML serves two purposes: defining component appearance and defining component initialization properties. Using an XSL file, each XML component tag is transformed into a set of HTML tags -- usually just DIVs -- that collectively describe the machine's appearance. For each component, one of the DIVs is usually what I consider the "object" DIV -- ie, a DIV with a class suffix "-object" and a data-value attribute containing all the parameters used to initialize an object of the appropriate class.

See the static init() function in any of the component class files; they're all very similar. The init() function calls getComponentParms() to extract the data-value attributes from the object DIV, passes them to the component's constructor, and then calls bindComponentControls() with the new object and the DIV. That function looks through all the DIV's child elements that have a "-binding" class and calls the object's setBinding() function. At a minimum, setBinding() will simply record the HTML control (button, list, or whatever) and add whatever onclick, onchange, etc, handlers it needs.

from pcjs.v1.

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.