Giter Site home page Giter Site logo

Selecting Events with Style about dom HOT 6 OPEN

AdamSobieski avatar AdamSobieski commented on May 27, 2024
Selecting Events with Style

from dom.

Comments (6)

annevk avatar annevk commented on May 27, 2024

Hey, please give https://whatwg.org/faq#adding-new-features a read and improve the problem description based on that.

from dom.

AdamSobieski avatar AdamSobieski commented on May 27, 2024

@annevk, thank you. I enhanced the problem description. What do you think?

from dom.

annevk avatar annevk commented on May 27, 2024

I think the problem description still very much assumes a particular solution. Ideally it would not talk about that at all and instead focus on something people cannot do right now that you would like to solve.

An alternative approach might be demonstrating through widespread library adoption and Stack Overflow questions that this is a pattern worth building into the web platform.

from dom.

AdamSobieski avatar AdamSobieski commented on May 27, 2024

I think the problem description still very much assumes a particular solution. Ideally it would not talk about that at all and instead focus on something people cannot do right now that you would like to solve.

Ah, thank you for clarifying. I revised the problem description again.

from dom.

emilio avatar emilio commented on May 27, 2024

Making CSS determine what JS function is going to execute is a big no-go IMO. You don't want to force style recalculation every time you need to read that process property.

from dom.

AdamSobieski avatar AdamSobieski commented on May 27, 2024

In theory, stylesheets of event selectors, in the above cases CSS-based, would be runtime-compiled into functions which would invoke JavaScript functions as matching events were detected.

The goal is to be able to efficiently filter and process streams of incoming events. My thoughts for the CSS-based proposal are that most Web developers already understand CSS selectors syntax and the CSSOM. The hope is that it would be easier for Web developers to modify stylesheets, as needed, than to modify event-filtering logic in JavaScript files.

Also, selectors-based approaches would mean that filtering would be portable between clients and servers. Clients could update their filtering criteria, e.g., in response to users' UI gestures, and transmit updated selectors to servers.

Event-stream querying languages include, but are not limited to: Stream Analytics Query Language, StreamSQL, Kafka KSQL, SQLStreams, SamzaSQL, and Storm SQL.

Other possibilities include utilizing selectors from JSON querying languages, e.g., JSONiq and JQL.

From the JSONiq specification:

The main source of inspiration behind JSONiq is XQuery, which has been proven so far a successful and productive query language for semi-structured data (in particular XML). JSONiq borrowed a large numbers of ideas from XQuery, like the structure and semantics of a FLWOR construct, the functional aspect of the language, the semantics of comparisons in the face of data heterogeneity, the declarative, snapshot-based updates. However, unlike XQuery, JSON is not concerned with the peculiarities of XML, like mixed content, ordered children, the confusion between attributes and elements, the complexities of namespaces and QNames, or the complexities of XML Schema, and so on.

from dom.

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.