You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by choirul anam <ic...@gmail.com> on 2019/04/30 01:30:43 UTC
difference between id and localId
All,
What is the difference between id and localId in royale?
When and where we use?
Thanks,
Choirul
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Re: difference between id and localId
Posted by Carlos Rovira <ca...@apache.org>.
Hi,
I make this question a SOF question and respond myself [1]
Please if you can vote response it will help me to start generating
reputation to do more things on SOF.
[1]
https://stackoverflow.com/questions/55923924/whats-the-difference-between-id-and-localid-in-apache-royale/55924303#55924303
El mar., 30 abr. 2019 a las 4:19, Alex Harui (<ah...@adobe.com>) escribió:
> The "id" property also ends up as the HTMLElement's id in the DOM for CSS
> ID selectors. Which works great until you have multiple instances of some
> MXML. You may get errors from the browser for having more than one
> HTMLElement with the same id.
>
> So, if you are creating MXML components that will have multiple instances
> and don't need CSS ID selectors, use localId.
>
> HTH,
> -Alex
>
> On 4/29/19, 6:31 PM, "choirul anam" <ic...@gmail.com> wrote:
>
> All,
> What is the difference between id and localId in royale?
> When and where we use?
>
> Thanks,
> Choirul
>
>
>
>
> --
> Sent from:
> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Ca71a6bcfcd8044f1eba808d6cd0b7f99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636921846642595469&sdata=VcXvgJP%2BrKxQO%2FHqQHRappx9CXDkuwkNLUhs%2FJ1xMkE%3D&reserved=0
>
>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: difference between id and localId
Posted by Alex Harui <ah...@adobe.com>.
The "id" property also ends up as the HTMLElement's id in the DOM for CSS ID selectors. Which works great until you have multiple instances of some MXML. You may get errors from the browser for having more than one HTMLElement with the same id.
So, if you are creating MXML components that will have multiple instances and don't need CSS ID selectors, use localId.
HTH,
-Alex
On 4/29/19, 6:31 PM, "choirul anam" <ic...@gmail.com> wrote:
All,
What is the difference between id and localId in royale?
When and where we use?
Thanks,
Choirul
--
Sent from: https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-users.20374.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Ca71a6bcfcd8044f1eba808d6cd0b7f99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636921846642595469&sdata=VcXvgJP%2BrKxQO%2FHqQHRappx9CXDkuwkNLUhs%2FJ1xMkE%3D&reserved=0