<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27046</bug_id>
          
          <creation_ts>2014-10-14 13:19:58 +0000</creation_ts>
          <short_desc>Invoke and report to window.onerror shorthand</short_desc>
          <delta_ts>2014-11-26 10:12:49 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          <blocked>17713</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Anne">annevk</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>113102</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-10-14 13:19:58 +0000</bug_when>
    <thetext>See also bug 25138 comment 2.

To define event listeners I need a way to invoke a callback and instead of rethrowing the exceptions, report them for window.onerror.

Bug 17713 comment 16 has a long list of algorithms that need to invoke the same hook.

I suppose there might be a difference between some whether microtasks need to be run at the end, have not investigated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115170</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-19 23:49:42 +0000</bug_when>
    <thetext>I added &quot;report the exception&quot;. Does that handle it? I&apos;m not really sure I understand the request here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115212</commentid>
    <comment_count>2</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-20 12:10:16 +0000</bug_when>
    <thetext>That got added as part of https://html5.org/r/8849 it seems.

Ian, as said in comment 0, in bug 25138 you said this: &quot;Happy to add something that invokes a callback and then catches and reports exceptions.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115260</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-20 20:50:41 +0000</bug_when>
    <thetext>I am still happy to add that if that&apos;s what you need. As I implied in bug 25318 comment 2, though, I can&apos;t do that until there&apos;s a definition of &quot;invoke&quot; that I can use.

Right now, you would just say (modulo there being no definition of &quot;invoke&quot;):

   Invoke the callback /callback/. If this raises an
   exception, /report the exception/.

Do you really need a macro just for that? I mean, it would probably just turn the above into something like:

   Invoke the callback /callback/ using the /exception-
   reporting algorithm/.

...which doesn&apos;t seem any better. It&apos;s barely any shorter, and it&apos;s more confusing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115264</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-21 06:46:07 +0000</bug_when>
    <thetext>I thought there was something else around invoke that was needed, with respect to code entry-points.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115265</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-21 06:46:57 +0000</bug_when>
    <thetext>That is, that a more elaborate setup was needed to invoke a callback. I thought we&apos;d run microtasks after them as well. Just saying &quot;invoke&quot; probably does not do that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115318</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-21 22:04:20 +0000</bug_when>
    <thetext>Yes. But that belongs in WebIDL. That&apos;s what bug 25138 is about.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115351</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-22 09:59:36 +0000</bug_when>
    <thetext>That bug is just about a hook for the IDL algorithm, no? IDL doesn&apos;t know about microtasks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115416</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-24 18:51:15 +0000</bug_when>
    <thetext>What does microtasks have to do with anything? I thought we were just talking about calling a callback. Microtasks happen at the end of tasks, no? I feel like there&apos;s some grand vision that I&apos;m missing here, and you keep showing me individual puzzle pieces and expecting me to draw the whole thing...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115458</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-25 11:03:42 +0000</bug_when>
    <thetext>Sorry for the confusion. I never really understood when microtasks were supposed to run. I thought it was both at the end of task and after event listener callbacks.

I was hoping you still had all the pieces in your head with respect to how we wanted to define this interaction of events, IDL, and HTML.

It seems I&apos;m wrong so I guess you should close this, I should start using the new &quot;report the exception&quot; mechanism and we&apos;ll see if anything is still undefined.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115500</commentid>
    <comment_count>10</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-11-26 10:12:49 +0000</bug_when>
    <thetext>As per the commit mentioned in comment 2. It seems nothing much else is needed here after all.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>