mirror of
https://github.com/Mibew/CanteenHTML5.git
synced 2025-02-05 21:44:41 +03:00
1050 lines
22 KiB
HTML
1050 lines
22 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
|
|
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
|
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
|
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
|
|
<script src="http://yui.yahooapis.com/3.10.1/build/yui/yui-min.js"></script>
|
|
<title>Canteen HTML5 API v1.0.0 API Documentation : Attribute</title>
|
|
</head>
|
|
<body class="yui3-skin-sam">
|
|
|
|
<div id="doc">
|
|
<div id="hd" class="yui3-g header">
|
|
<div class="yui3-u-3-4">
|
|
|
|
<h1><a href=""><img src="../assets/css/logo.png" title="Canteen HTML5 API"></a></h1>
|
|
|
|
</div>
|
|
<div class="yui3-u-1-4 version">
|
|
<em>API Documentation for: 1.0.0</em>
|
|
</div>
|
|
</div>
|
|
<div id="bd" class="yui3-g">
|
|
|
|
<div class="yui3-u-1-4">
|
|
<div id="docs-sidebar" class="sidebar apidocs">
|
|
<div id="api-list">
|
|
<h2 class="off-left">APIs</h2>
|
|
<div id="api-tabview" class="tabview">
|
|
<div id="api-tabview-filter">
|
|
<input type="search" id="api-filter" placeholder="Type to filter APIs">
|
|
</div>
|
|
<ul class="tabs">
|
|
<li><a href="#api-classes">Classes</a></li>
|
|
<li><a href="#api-modules">Namespaces</a></li>
|
|
</ul>
|
|
<div id="api-tabview-panel">
|
|
<ul id="api-classes" class="apis classes">
|
|
|
|
<li><a href="../classes/Attribute.html">Attribute</a></li>
|
|
|
|
<li><a href="../classes/Comment.html">Comment</a></li>
|
|
|
|
<li><a href="../classes/Document.html">Document</a></li>
|
|
|
|
<li><a href="../classes/html.html">html</a></li>
|
|
|
|
<li><a href="../classes/HTML5Error.html">HTML5Error</a></li>
|
|
|
|
<li><a href="../classes/Node.html">Node</a></li>
|
|
|
|
<li><a href="../classes/NodeContainer.html">NodeContainer</a></li>
|
|
|
|
<li><a href="../classes/SimpleList.html">SimpleList</a></li>
|
|
|
|
<li><a href="../classes/Table.html">Table</a></li>
|
|
|
|
<li><a href="../classes/Text.html">Text</a></li>
|
|
|
|
</ul>
|
|
|
|
<ul id="api-modules" class="apis modules">
|
|
|
|
<li><a href="../modules/Canteen_HTML5.html">Canteen\HTML5</a></li>
|
|
|
|
<li><a href="../modules/global.html">global</a></li>
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui3-u-3-4">
|
|
<div id="api-options">
|
|
Show:
|
|
<label for="api-show-inherited">
|
|
<input type="checkbox" id="api-show-inherited" checked>
|
|
Inherited
|
|
</label>
|
|
|
|
<label for="api-show-protected">
|
|
<input type="checkbox" id="api-show-protected">
|
|
Protected
|
|
</label>
|
|
|
|
<label for="api-show-private">
|
|
<input type="checkbox" id="api-show-private">
|
|
Private
|
|
</label>
|
|
<label for="api-show-deprecated">
|
|
<input type="checkbox" id="api-show-deprecated">
|
|
Deprecated
|
|
</label>
|
|
|
|
</div>
|
|
<div class="apidocs">
|
|
<div id="docs-main">
|
|
<div class="content">
|
|
<h1>Attribute Class</h1>
|
|
<div class="box meta">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Namespace: <a href="../modules/Canteen\HTML5.html">Canteen\HTML5</a>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="box intro">
|
|
<p>An HTML attribute used on the Node, this is used internally.
|
|
Do not initiate this class directly, use the <code>html()</code> function
|
|
to create attributes on elements.</p>
|
|
<pre class="code prettyprint"><code>echo html('a', 'Link', 'class=button href="about.html"');
|
|
|
|
echo html('a', 'Link')
|
|
->setAttribute('class', 'button')
|
|
->setAttribute('href', 'about.html');</code></pre>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="constructor">
|
|
<h2>Constructor</h2>
|
|
<div id="method_Attribute" class="method item">
|
|
<h3 class="name"><code>Attribute</code></h3>
|
|
|
|
|
|
<div class="args">
|
|
<span class="paren">(</span><ul class="args-list inline commas">
|
|
|
|
<li class="arg">
|
|
|
|
<code class="optional">[name=null]</code>
|
|
|
|
</li>
|
|
|
|
<li class="arg">
|
|
|
|
<code class="optional">[value=null]</code>
|
|
|
|
</li>
|
|
|
|
</ul><span class="paren">)</span>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="description">
|
|
|
|
</div>
|
|
|
|
|
|
<div class="params">
|
|
<h4>Parameters:</h4>
|
|
|
|
<ul class="params-list">
|
|
|
|
<li class="param">
|
|
|
|
<code class="param-name optional">[name=null]</code>
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
|
|
|
|
|
|
|
|
|
<div class="param-description">
|
|
<p>The name of the attribute</p>
|
|
|
|
</div>
|
|
|
|
|
|
</li>
|
|
|
|
<li class="param">
|
|
|
|
<code class="param-name optional">[value=null]</code>
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
|
|
|
|
|
|
|
|
|
<div class="param-description">
|
|
<p>The value of the attribute</p>
|
|
|
|
</div>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div id="classdocs" class="tabview">
|
|
<ul class="api-class-tabs">
|
|
<li class="api-class-tab index"><a href="#index">Index</a></li>
|
|
|
|
|
|
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
|
|
|
|
|
|
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
<div>
|
|
<div id="index" class="api-class-tabpanel index">
|
|
<h2 class="off-left">Item Index</h2>
|
|
|
|
|
|
<div class="index-section methods">
|
|
<h3>Methods</h3>
|
|
|
|
<ul class="index-list methods">
|
|
|
|
<li class="index-item method">
|
|
<a href="#method___isset">__isset</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="index-item method">
|
|
<a href="#method___toString">__toString</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="index-item method">
|
|
<a href="#method_getName">getName</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="index-item method protected">
|
|
<a href="#method_getValue">getValue</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="index-item method">
|
|
<a href="#method_setName">setName</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="index-item method protected">
|
|
<a href="#method_setValue">setValue</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="index-item method">
|
|
<a href="#method_shorthand">shorthand</a>
|
|
|
|
|
|
<span class="flag static">static</span>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="index-section properties">
|
|
<h3>Properties</h3>
|
|
|
|
<ul class="index-list properties">
|
|
|
|
<li class="index-item property private">
|
|
<a href="#property__name">_name</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="index-item property private">
|
|
<a href="#property__value">_value</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="methods" class="api-class-tabpanel">
|
|
<h2 class="off-left">Methods</h2>
|
|
|
|
|
|
<div id="method___isset" class="method item">
|
|
<h3 class="name"><code>__isset</code></h3>
|
|
|
|
|
|
<div class="args">
|
|
<span class="paren">(</span><ul class="args-list inline commas">
|
|
|
|
<li class="arg">
|
|
|
|
<code>name</code>
|
|
|
|
</li>
|
|
|
|
</ul><span class="paren">)</span>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="description">
|
|
<p>See if a property exists</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="params">
|
|
<h4>Parameters:</h4>
|
|
|
|
<ul class="params-list">
|
|
|
|
<li class="param">
|
|
|
|
<code class="param-name">name</code>
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
|
|
|
|
|
|
|
|
<div class="param-description">
|
|
<p>The name of the property</p>
|
|
|
|
</div>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="method___toString" class="method item">
|
|
<h3 class="name"><code>__toString</code></h3>
|
|
|
|
|
|
<span class="paren">()</span>
|
|
|
|
|
|
|
|
<span class="returns-inline">
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="description">
|
|
<p>Convert the attribute to an HTML tag attribute string</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="returns">
|
|
<h4>Returns:</h4>
|
|
|
|
<div class="returns-description">
|
|
|
|
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
|
|
|
|
<p>String representation of attribute</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="method_getName" class="method item">
|
|
<h3 class="name"><code>getName</code></h3>
|
|
|
|
|
|
<span class="paren">()</span>
|
|
|
|
|
|
|
|
<span class="returns-inline">
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="description">
|
|
<p>Get the name of this attribute</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="returns">
|
|
<h4>Returns:</h4>
|
|
|
|
<div class="returns-description">
|
|
|
|
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
|
|
|
|
<p>The attribute's name</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="method_getValue" class="method item protected">
|
|
<h3 class="name"><code>getValue</code></h3>
|
|
|
|
|
|
<span class="paren">()</span>
|
|
|
|
|
|
|
|
<span class="returns-inline">
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
<span class="flag protected">protected</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="description">
|
|
<p>Get the value of this attribute</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="returns">
|
|
<h4>Returns:</h4>
|
|
|
|
<div class="returns-description">
|
|
|
|
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>:
|
|
|
|
<p>The value of attribute</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="method_setName" class="method item">
|
|
<h3 class="name"><code>setName</code></h3>
|
|
|
|
|
|
<div class="args">
|
|
<span class="paren">(</span><ul class="args-list inline commas">
|
|
|
|
<li class="arg">
|
|
|
|
<code class="optional">[name=null]</code>
|
|
|
|
</li>
|
|
|
|
</ul><span class="paren">)</span>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="description">
|
|
<p>Set the name of this attribute, cannot be empty</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="params">
|
|
<h4>Parameters:</h4>
|
|
|
|
<ul class="params-list">
|
|
|
|
<li class="param">
|
|
|
|
<code class="param-name optional">[name=null]</code>
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
<span class="flag optional" title="This parameter is optional.">optional</span>
|
|
|
|
|
|
|
|
|
|
<div class="param-description">
|
|
<p>The name of the attribute</p>
|
|
|
|
</div>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="method_setValue" class="method item protected">
|
|
<h3 class="name"><code>setValue</code></h3>
|
|
|
|
|
|
<div class="args">
|
|
<span class="paren">(</span><ul class="args-list inline commas">
|
|
|
|
<li class="arg">
|
|
|
|
<code>value</code>
|
|
|
|
</li>
|
|
|
|
</ul><span class="paren">)</span>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="flag protected">protected</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="description">
|
|
<p>Set the value of this attribute, this cannot be empty</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="params">
|
|
<h4>Parameters:</h4>
|
|
|
|
<ul class="params-list">
|
|
|
|
<li class="param">
|
|
|
|
<code class="param-name">value</code>
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
|
|
|
|
|
|
|
|
<div class="param-description">
|
|
<p>The value to set</p>
|
|
|
|
</div>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="method_shorthand" class="method item">
|
|
<h3 class="name"><code>shorthand</code></h3>
|
|
|
|
|
|
<div class="args">
|
|
<span class="paren">(</span><ul class="args-list inline commas">
|
|
|
|
<li class="arg">
|
|
|
|
<code>str</code>
|
|
|
|
</li>
|
|
|
|
</ul><span class="paren">)</span>
|
|
</div>
|
|
|
|
|
|
|
|
<span class="returns-inline">
|
|
<span class="type">Dictionary</span>
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="flag static">static</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="description">
|
|
<p>Convert a string into an associative array</p>
|
|
|
|
</div>
|
|
|
|
|
|
<div class="params">
|
|
<h4>Parameters:</h4>
|
|
|
|
<ul class="params-list">
|
|
|
|
<li class="param">
|
|
|
|
<code class="param-name">str</code>
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
|
|
|
|
|
|
|
|
<div class="param-description">
|
|
<p>The string, delineated by semicolons, and colons for attributes:values</p>
|
|
|
|
</div>
|
|
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="returns">
|
|
<h4>Returns:</h4>
|
|
|
|
<div class="returns-description">
|
|
|
|
|
|
<span class="type">Dictionary</span>:
|
|
|
|
<p>The collection of attributes</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="properties" class="api-class-tabpanel">
|
|
<h2 class="off-left">Properties</h2>
|
|
|
|
|
|
<div id="property__name" class="property item private">
|
|
<h3 class="name"><code>_name</code></h3>
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
|
|
|
|
|
|
|
|
<span class="flag private">private</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="description">
|
|
<p>The name of the attribute</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div id="property__value" class="property item private">
|
|
<h3 class="name"><code>_value</code></h3>
|
|
<span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
|
|
|
|
|
|
|
|
|
|
<span class="flag private">private</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="meta">
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="description">
|
|
<p>The value of the attribute</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
|
<script>prettyPrint();</script>
|
|
<script src="../assets/js/yui-prettify.js"></script>
|
|
<script src="../assets/../api.js"></script>
|
|
<script src="../assets/js/api-filter.js"></script>
|
|
<script src="../assets/js/api-list.js"></script>
|
|
<script src="../assets/js/api-search.js"></script>
|
|
<script src="../assets/js/apidocs.js"></script>
|
|
</body>
|
|
</html> |