Does anyone use web Intents in JavaScript?

I m using web intents but how do i know that which intent i m using for which component/Purpose. Here is the link https://github.com/mozilla/firefox-voice/blob/master/docs/writing-an-intent.md#format-of-the-intents. From this link I found the pattern of how do i write but still confused.
here is the folder


I have to add some more text to the popup suggestions but i could not find any intent related to it .
In this image i have to add few more lines.
Can someone guess which intent should i use for this purpose ?

It isn’t using Web Intents, that is an [experimental, deprecated, Chrome-only] API to allow Android apps to open directly from a web page link. In this context, intent is what the commands you define for this specific Firefox extension are called, they have nothing to do with Web Intents – you specify what your intent is when a specific voice command is made
Basically, what is explained on that README is the extent of the documentation on them: that API exists inside that project, to allow you to specify things specific to that project

But someone from this project community chat told me that i have to add text into the related intents.

Yes, clearly you do, but this is nothing to do with Web Intents (I have used Web Intents, but that is of no use to you because it is a completely different thing).

You need to define an intent, following the rules laid out in the document you linked to, I would look at a pull request where an intent has been defined for an example.

Just want to emphasize that this is just how you define some specific functionality within that specific application’s codebase: it’s not some common JS API. And the application itself is an experimental add-on to Firefox which allows test-driving of voice command functionality in isolation from the main Firefox codebase. This is why (as with your previous questions), I need to stress that you have to provide people with concrete, scoped code problems if you want help: the chances of anyone having worked on this (and being able to give you help for extremely general questions that you’re asking) are astronomically small

2 Likes

Thanks for the long note . I m only confused about how to define an intent . I will send you a link of my PR to look .

No, don’t do that. The person/s who review your PR have to be the person/s working on that codebase. I would need to understand the codebase (this is a massive thing you are asking, as I keep trying to get across to you), install the extension, run it to figure out how it works, fetch your fork of it, run that, etc. I’ll be blunt here: I’m not prepared to do that. It’s what I do for a job, and it takes large amounts of time, and as I am employed to do my job, I can’t do another job at the same time.

If you do not understand how to work with this specific part of the codebase’s internal API, and you want help here, you need to provide a small, concrete, reproducible example of the thing you’re stuck on. If it’s more general and you cannot do that (which seems to be the case here), you need to ask someone working in the codebase to explain it to you in terms you understand.

This is not a tiny thing like an FCC algorithm problem (for example). You can’t just say “I’m completely stuck and don’t know how to approach this” and just expect useful help here (rather than asking people who actually work on the code), because it’s a large, complex real-world codebase. I don’t think you quite understand the magnitude of what you’re asking of people

It is likely that this is quite a simple thing: the issue has been tagged by the maintainers as good for beginners, so I can’t see why they would have done that if it was super complicated. But you need to ask one of them to get past this blocker.


Kindly check it .

This is the last time I’m writing anything in this thread. You are not particularly good at asking questions or reading instructions, amd imo you need to drastically improve these skills.

It tells you in the error what the issue is.

As you posted a screenshot, I can’t copy paste this message, but it’s telling you the file (module) Doorhanger has no key “Doorhanger”, instead it has the key “someIntent.Doorhanger”

From the README:

Imagine we are creating an intent someIntent.command .

We’ll create a file (in TOML) in extension/intents/someIntent/someIntent.toml to describe the intent:

someIntent is an example. Every single thing isn’t called someIntent. But if you wanted the intent you defined to have the key someIntent, it would live in a file called someIntent.toml
(and you’re not supposed to call yours someIntent, that’s like calling it foo or helloWorld!). The filename of the module is someIntent.toml, the top level key is someIntent, you use someIntent.command() to do stuff, etc.

This comes from a 5 second scan reading of an error message + a 10 second scan reading a set of instructions for defining commands for the codebase, there may be some subtleties I’ve missed

Sorry for that mistake .I had corrected that mistake immediately.