On 10/26/16, 2:18 PM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
<carlos.rov...@gmail.com on behalf of carlos.rov...@codeoscopic.com> wrote:

>Hi,
>
>I implemented the Disabled bead, just notice that
>
>host.element is HTMLInputElement is not working, I had to comment lines as
>below to get it working.
>I don't understand @flexjsignorecoercion HTMLInputElement
>I thought that line was to make "is" work here.

@flexjsignorecoercion makes "as" work by suppressing it.  We don't
suppress "is" right now.  So the recommended pattern is to use "as" and if
you really need to, do a null check afterwards.

Either way, I thought "is" and "as" would "just work" with HTMLElements.
There is an "instanceof" check in the code that should work.  The
@flexjsignorecoercion is mainly an optimization to suppress code you
pretty much know is going to work.

However, it looks like it may not be safe to test against
HTMLInputElements.  See [1].

-Alex

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=555837

Reply via email to