W3C home > Mailing lists > Public > public-html-admin@w3.org > July 2013

[Bug 22770] New: add global onpaint, onresize attributes?

From: <bugzilla@jessica.w3.org>
Date: Tue, 23 Jul 2013 10:44:48 +0000
To: public-html-admin@w3.org
Message-ID: <bug-22770-2495@http.www.w3.org/Bugs/Public/>

            Bug ID: 22770
           Summary: add global onpaint, onresize attributes?
    Classification: Unclassified
           Product: HTML WG
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: HTML5 spec
          Assignee: dave.null@w3.org
          Reporter: jmichae3@yahoo.com
        QA Contact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-admin@w3.org,

please add:

- global onpaint="" 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:
<div id="o" style="z-index:2;" onpaint="dopaint()">yahoo!</div>
function dopaint() {
    //move an element around
    var e=document.getElementById('o');
    var old=e.style.top.toString();
    //get rid of "px off of end and get value, add 4 mod document.height
    e.style.top =
    //however, this code COULD be a problem, since it causes a repaint, 
    //and might be the kind of thing people try...
Example 2:
<p>document pixel area=<span id="t"
onpaint="document.getElementById('t').innerHTML = document.width *

specifically, I needed the onpaint thing for working with a live rotating 4D
<canvas></canvas> 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="" or global onresize="" attribute which activates when the
browser document window is resized and executes the code in the string
following the = sign. I don't know exactly in what to place this, whether as a
DOM method/property (?) or if it'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.

<!--form controls for 4D-->
<div id="o2" onresize="doresize()"><canvas id="c">4D canvas</canvas></div>
function doresize() {
    var formControls=document.getElementById('f').height;
    var nw=getElementById('nnavigation').width;
    var c=document.getElementById('c');
    c.width = document.width - nw; 
    c.height = document.viewport.height - formControls.height;

You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 23 July 2013 10:44:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:57:24 UTC