Comments (5)
Let me rephrase that, just to make sure i understood your question:
After typing "New York" in the input field, you want to read the contents of the auto complete list. Then you want to iterate through each of them to do some logic and choose one to click on. Is that right?
Concerning your second question: What exactly do you mean by "Sometimes filling one field can change the contents of other fields"? Could you give an example?
from abmash.
Sorry for not being clear enough. For the first question, what you understood is correct.
For the second question, you can open http://www.cars.com/. Here, each 'make' has corresponding 'models'. Thus, if you change a make, its model will also be changed. Sometimes, new fields would be visible / added in the page due to the events. e.g. if you click round-trip, it provides the fields necessary for returning trip. If you select one-way, it doesn't show the fields needed for round trip etc.
from abmash.
Ok, what you ask for is not easy to achieve. The DOM tree can change at any point of time, with or without user interaction. Imagine a real-time application, that updates user comments to all online clients when they are submitted.
To automatically create a list of all elements that are updated, deleted or new it would be necessary to store the whole DOM tree in a cache periodically. If anything changes the element(s) could be put in a list. Then, you would be able to check that changelist after your interaction (e.g. "click on specific car model").
We have some problems though:
- Let's assume we create a changelist everytime before and after a user interaction. In the same time, a real-time update changes something somewhere on the page. In my opinion it's not possible to distinguish between that update and the outcome of your interaction. How do we deal with that?
- Storing the whole DOM tree after every interaction may be a memory problem. Making diffs may lead to performance problems. Not sure about that, though.
You also asked "Is it possible to get the events associated with an element?". The answer is: not with 100% certainty. Pure JavaScript events that are attached to elements are detectable, but each framework like jQuery, Prototype, Dojo, etc. has its own mechanism to deal with events and triggers. Therefore it would be necessary to implement checks for each framework.
Nevertheless, it's a very good idea nobal. Mabye we can find a good solution. I'd love to implement this feature.
from abmash.
Thank you Alper for your feedback. I understand that the tasks are not that easy. However, I'm still loving current Abmash. Adding such features would make it more interesting and useful for sure.
from abmash.
I am happy that you like Abmash. I will think about your questions and may update this issue sooner or later. Feel free to add your thoughts when something comes into your mind.
from abmash.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abmash.