Yeah, that's the sort of thing I was concerned about.  XML does call 
QName.toString() but it doesn't seem to actually care too much about what comes 
back.  In toXMLName it takes whatever name is and calls toString() on it.  The 
QName.toString() is different between SWF and JS.  It is only in JS that we 
modify the uri to be a valid JS property name.  We used to use bracket syntax, 
but that's what ClosureCompiler is choking on.

The question is what does someone do with myXML.name().toString()?  Are they 
matching it up against a URI?  They should be calling QName.match().

I couldn't immediately think of a way for QName to know it is being used for 
XML vs other properties.  We could create an XMLQName class for JS to return 
from name() that doesn't modify the URI.

-Alex

On 12/27/18, 1:04 PM, "Harbs" <harbs.li...@gmail.com> wrote:

    I don’t think we’re using toString() anywhere ourselves, but what happens 
if someone has myXML.name().toString()? (Or an implicit cast) Will this break 
their Flash code?
    
    > On Dec 27, 2018, at 7:36 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
    > 
    > Harbs,
    > 
    > I just changed QName.toString() to match the new namespace format the 
compiler is outputting in order to make Google Closure Compiler happy.  Now I'm 
wondering if QName.toString() is used in Royale XML.
    > 
    > Thoughts?
    > -Alex
    > 
    
    

Reply via email to