<?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>22770</bug_id>
          
          <creation_ts>2013-07-23 10:44:48 +0000</creation_ts>
          <short_desc>add global onpaint, onresize attributes?</short_desc>
          <delta_ts>2013-09-03 13:21:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jim Michaels">jmichae3</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>kornel</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>91127</commentid>
    <comment_count>0</comment_count>
    <who name="Jim Michaels">jmichae3</who>
    <bug_when>2013-07-23 10:44:48 +0000</bug_when>
    <thetext>please add:

- global onpaint=&quot;&quot; attribute which gets activated on a browser window repaint, with which it executes the code therein, such as a javascript function call.can call a js function that 
Example 1:
&lt;div id=&quot;o&quot; style=&quot;z-index:2;&quot; onpaint=&quot;dopaint()&quot;&gt;yahoo!&lt;/div&gt;
&lt;script&gt;
function dopaint() {
    //move an element around
    var e=document.getElementById(&apos;o&apos;);
    var old=e.style.top.toString();
    //get rid of &quot;px off of end and get value, add 4 mod document.height
    e.style.top = (((parseInt(old.substr(0,old.length)-2)+4)%document.height)+&apos;px&apos;;
    //however, this code COULD be a problem, since it causes a repaint, 
    //and might be the kind of thing people try...
}
&lt;/script&gt;
Example 2:
&lt;p&gt;document pixel area=&lt;span id=&quot;t&quot; onpaint=&quot;document.getElementById(&apos;t&apos;).innerHTML = document.width * document.height&quot;&gt;????&lt;/span&gt;&lt;/p&gt;

specifically, I needed the onpaint thing for working with a live rotating 4D &lt;canvas&gt;&lt;/canvas&gt; with support for red-blue 3D glasses someday I am trying to port from Java, which requires a paint hook do do animation using double-buffering as fast as it can. *IF* I can do double-buffering with canvas... this is for math folks who want to study 4D.


- window.onresize=&quot;&quot; or global onresize=&quot;&quot; attribute which activates when the browser document window is resized and executes the code in the string following the = sign. I don&apos;t know exactly in what to place this, whether as a DOM method/property (?) or if it&apos;s more appropriate for 

this comes in handy for games, but also for regular DHTML for element positioning and page sizing. many times a web developer will make a page hard-coded for certain screen sizes, but knowing the document width and height, and being able to rework the document for that could be handy for some. may get popular. I know I could use these both.

Example:
&lt;!--form controls for 4D--&gt;
&lt;div id=&quot;o2&quot; onresize=&quot;doresize()&quot;&gt;&lt;canvas id=&quot;c&quot;&gt;4D canvas&lt;/canvas&gt;&lt;/div&gt;
&lt;script&gt;
function doresize() {
    var formControls=document.getElementById(&apos;f&apos;).height;
    var nw=getElementById(&apos;nnavigation&apos;).width;
    var c=document.getElementById(&apos;c&apos;);
    c.width = document.width - nw; 
    c.height = document.viewport.height - formControls.height;
}
&lt;/script&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91136</commentid>
    <comment_count>1</comment_count>
    <who name="Kornel Lesinski">kornel</who>
    <bug_when>2013-07-23 13:45:42 +0000</bug_when>
    <thetext>Have you tried requestAnimationFrame and window.onresize?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92876</commentid>
    <comment_count>2</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2013-09-03 13:21:34 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: none
Rationale: We already have onresize, and painting at the &quot;right&quot; frequency can already be done with requestAnimationFrame().</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>