--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/d04e9df0-f716-4c75-9e6a-35688c8285d0%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
Thanks for replay.
Before I set it, port.name is an empty string. As I need to identify different port, so I want to set a name for each port.
Is there any official document that show the name cannot be set by user?
I just want to know why it cannot be setted.
Generally, it is not a good idea to set properties of objects that are not defined by you. The behavior is undefined.Does it have a name before you try to set it and you just want to change it and because connectNative does not let you (which seems like either a Chrome bug, or wrong documentation), you chose this way?Or does it have an empty name?☆PhistucK
On Thu, Jan 17, 2019 at 5:52 AM <hujunhu...@gmail.com> wrote:
--Hi guys,I developed my chrome extension that uses a native message host. In eventPage.js, I connect to local host as follow:port = chrome.runtime.connectNative(msg.host);After i get the port, I need to set its name to a special string as "port1" to mark it. My code is as follow:port.name = "port1";This works ok in most cases, but it does not work in follow case:windows 7 + Chrome Version 72.0.3626.53(Offical Build) beta(64-bit).After I set port.name, its still empty. It seems that port is readonly.Why this happen? Is it a bug for this version of Chrome?
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extensions+unsub...@chromium.org.
Thanks for replay.
Before I set it, port.name is an empty string. As I need to identify different port, so I want to set a name for each port.
Is there any official document that show the name cannot be set by user?
I just want to know why it cannot be setted.
On Friday, January 18, 2019 at 3:25:26 AM UTC+8, PhistucK wrote:
Generally, it is not a good idea to set properties of objects that are not defined by you. The behavior is undefined.Does it have a name before you try to set it and you just want to change it and because connectNative does not let you (which seems like either a Chrome bug, or wrong documentation), you chose this way?Or does it have an empty name?☆PhistucK
On Thu, Jan 17, 2019 at 5:52 AM <hujunhu...@gmail.com> wrote:
--Hi guys,I developed my chrome extension that uses a native message host. In eventPage.js, I connect to local host as follow:port = chrome.runtime.connectNative(msg.host);After i get the port, I need to set its name to a special string as "port1" to mark it. My code is as follow:port.name = "port1";This works ok in most cases, but it does not work in follow case:windows 7 + Chrome Version 72.0.3626.53(Offical Build) beta(64-bit).After I set port.name, its still empty. It seems that port is readonly.Why this happen? Is it a bug for this version of Chrome?
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/d04e9df0-f716-4c75-9e6a-35688c8285d0%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at https://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/9ca98f5c-ab98-4e2c-b1b6-bcdfad8a134a%40chromium.org.