Closed
Bug 749103
Opened 13 years ago
Closed 5 years ago
Add demo pages adding non-standard actiontypes to maction
Categories
(Developer Documentation Graveyard :: MathML, defect)
Developer Documentation Graveyard
MathML
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: fredw, Unassigned)
References
Details
As Karl said in bug 544036 comment 2, many actiontype values can be implemented using javascript (plus CSS, HTML etc). The MathML describes default attribute that we should try to support but it could be interesting to demonstrate how authors can define their own actiontypes that add interactivity. The idea of the bug is the following: create a maction.js file script that can be attached to any Web page. Once the page is loaded (maction.js may add an "onload" listener) the script looks for maction elements on the page (getElementsByName) and adds to them the appropriate event listeners and UI with respect to the "actiontype" attribute attached. Here are some examples:
-------
<maction actiontype="input"> (expression) </maction>
The renderer displays the expression. For renderers that allow editing, when focus is passed to this element, the maction is replaced by what is entered, pasted, etc. MathML does not restrict what is allowed as input, nor does it require an editor to allow arbitrary input. Some renderers/editors may restrict the input to simple (linear) text.
<maction actiontype="highlight" my:color="red" my:background="yellow"> expression </maction>
In the example, non-standard attributes from another namespace are being used to pass additional information to renderers that support them, without violating the MathML Schema (see Section 2.3.3 Attributes for unspecified data). The my:color attributes might change the color of the characters in the presentation, while the my:background attribute might change the color of the background behind the characters.
<maction actiontype="menu" selection="positive-integer" > (menu item 1) (menu item 2) ... </maction>
This action type instructs a renderer to provide a pop up menu. This allows a one-to-many linking capability. Note that the menu items may be other <maction actiontype="menu">...</maction> expressions, thereby allowing nested menus.
-------
"input" is a standard MathML actiontype. I don't know if we should really implement natively it in a browser context but apparently some people find MathML input important. Hence we could add a demo for it, using the HTML <input> element for example and math parsers like ASCIIMathML.
"highlight" is easy to implement and could demonstrate the use of additional attributes. We could do a similar implementation for our former "restyle" attribute, but in a cleaner way.
"menu" is worth considering: it allows to test nested mactions (and particularly the order of events) as well as the use of "selection" attribute to implement a nonstandard actiontype.
Reporter | ||
Updated•12 years ago
|
Assignee: PraZuBeR → nobody
Status: ASSIGNED → NEW
Reporter | ||
Comment 1•11 years ago
|
||
Moving this to developer documentation.
Assignee: nobody → fscholz
Product: Core → Developer Documentation
Version: Trunk → unspecified
Updated•8 years ago
|
Assignee: fscholz → nobody
Comment 2•5 years ago
|
||
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•