Applicative mode (Styling)

Hello Everybody!!!!

What I get from Spec is that the Applicative mode for styling uses an Xpath Expression to select the nodes.


At each tick the style is re-initialised for the node and DOM tree can change.Thus, evaluated node set can change dynamically, thus a node may/maynot have applicative mode applied to it depending on the Xpath Evaluation. Is this understanding correct.

2) The Applicative mode is over-ridden by referential and inline style. What is the usage scenario for this mode

Thanx in advance.




Answer this question

Applicative mode (Styling)

  • rofu

    Everything except for W3C APIs applies to the live DOM (see upcoming blog... as soon as my machine is released...)

    Not quite sure what you are getting at with your second comment... you would not be able to tell the difference even if it did do it that way.



  • lfnovo

    Current behaviour doesn't work :-)

    Correct behaviour would be to evaluate styles on every tick, but purely from a performance perspective you wouldn't want to throw away all the styles and re-apply them every tick. Just leave them alone if nothing has changed.



  • Eighty

    Thanks for the answer.

    Another question :
    a) ( ~~Just to be sure~~ )Referential style applies to Loaded DOM

    BTW, the applicative mode is applied for 1 tick only
    i.e. it is similar to <set select="xpath" dur="1frame">

    this implies that applicative style would be set and unset every tick.





  • CSharpNewbie22

    It would apply to the live DOM, but it is broken in HDiSim.

    I have a blog post ready explaining the "property block" model (including a demo!) but of course the machine I wrote it on is stuck inside the kernel debugger and I'm waiting for someone to come look at it :-)

    The joys of dogfooding...



  • Nick_Dev

    "Referential mode" style    changes/modifies/applies to  the Loaded DOM.

    What does "applicative mode" changes/modifies/applies to

    a) LIVE DOM or
    b) the Loaded DOM

    Spec does not seem to be clear in this regard.....
    so what should be expected




  • LOTG

    Yes, it is evaluated at every tick... which makes them expensive to compute, so they should be avoided for things like //* or what-not.

    Better to use referential styling (ie, give the style an id="foo" attribute and then give the element a style="foo" attribute) for performance reasons.



  • Billy2005

    This is fine..but suppose if i have two buttons for navigation having class="navigation_buttons"
    Applcaive style is being used to apply style to them ..... say on basis of xpath :: class(navigation_buttons)

    if i add a third button of the same class (using script).

    Is it guranteed that all would have same style in other words is the applicative style evaluated at every tick...it should i suppose.




  • Indigo Cowboy

  • hellosmithy

    Thanks, I am waiting (eagerly) for your blog....

    donbox5 wrote:
    Thanks for the answer.

    Another question :
    a) ( ~~Just to be sure~~ )Referential style applies to Loaded DOM

    BTW, the applicative mode is applied for 1 tick only
    i.e. it is similar to <set select="xpath" dur="1frame">

    this implies that applicative style would be set and unset every tick.


    Oh , well ...i was just ....well...guessing the expected behaviour ...(not commenting on the curent behaviour ) ....


  • Mkennie

    Basically you would use applicative styles the same way you would in HTML with CSS; for example, all buttons should be the same width and height, or all inputs have the same font, etc.



  • Applicative mode (Styling)