<div dir="ltr"><div class="gmail_extra">On Sat, Mar 7, 2015 at 8:55 AM, Darin Adler <span dir="ltr">&lt;<a href="mailto:darin@apple.com" target="_blank">darin@apple.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Why do we have [Conditional=] in our IDL files? Perhaps because some ports lacked a way to do #if in the past?</blockquote><div><br></div><div>I think Conditional is a nicer/newer way of if-defing based on feature flags.</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Should we use #if or [Conditional]? See for example, HTMLMediaElement.idl, which has a mix of both styles. It&rsquo;s pretty ugly how the #if look in the IDL files, but even worse is a seemingly random mix of both #if and [Conditional].<br></blockquote><div><br></div><div>We should use Conditional as much as possible.</div><div><br></div><div>As far as I know one area we can&#39;t use Conditional= is if something depends on multiple feature flags or if it&#39;s specific to a binding language (JS/Objective-C/etc...).&nbsp; We should probably add a special feature flag for that; e.g. Conditional=JS.</div><div><br></div><div>- R. Niwa</div><div><br></div></div></div></div>