-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/air 51 asdocs #112
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<link rel="stylesheet" href="style.css" type="text/css" media="screen"> | ||
<link rel="stylesheet" href="print.css" type="text/css" media="print"> | ||
<meta content="Array,CASEINSENSITIVE,DESCENDING,NUMERIC,RETURNINDEXEDARRAY,UNIQUESORT,length,concat,every,filter,forEach,indexOf,join,lastIndexOf,map,pop,push,reverse,shift,slice,some,sort,sortOn,splice,insertAt,removeAt,toString,toLocaleString,unshift" name="keywords"> | ||
<meta content="Array,CASEINSENSITIVE,DESCENDING,NUMERIC,RETURNINDEXEDARRAY,UNIQUESORT,length,concat,every,filter,forEach,indexOf,join,lastIndexOf,map,pop,push,reverse,shift,slice,some,sort,sortOn,splice,insertAt,removeAt,toString,toLocaleString,unshift,includes,isEmpty" name="keywords"> | ||
<title>Array (ActionScript 3.0)</title> | ||
<script type="text/javascript" src="AC_OETags.js"></script> | ||
</head> | ||
|
@@ -236,6 +236,16 @@ | |
<tr class=""> | ||
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"> | ||
<div class="summarySignature"> | ||
<a class="signatureLink" href="#includes()">includes</a>(item:<a href="specialTypes.html#*">*</a>):<a href="Boolean.html">Boolean</a> | ||
</div> | ||
<div class="summaryTableDescription"> | ||
|
||
Checks whether the array includes the item that is passed in.</div> | ||
</td><td class="summaryTableOwnerCol">Array</td> | ||
</tr> | ||
<tr class=""> | ||
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"> | ||
<div class="summarySignature"> | ||
<a class="signatureLink" href="#indexOf()">indexOf</a>(searchElement:<a href="specialTypes.html#*">*</a>, fromIndex:<a href="int.html">int</a> = 0):<a href="int.html">int</a> | ||
</div> | ||
<div class="summaryTableDescription"> | ||
|
@@ -255,6 +265,16 @@ | |
Insert a single element into an array.</div> | ||
</td><td class="summaryTableOwnerCol">Array</td> | ||
</tr> | ||
<tr class=""> | ||
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"> | ||
<div class="summarySignature"> | ||
<a class="signatureLink" href="#isEmpty()">isEmpty</a>():<a href="Boolean.html">Boolean</a> | ||
</div> | ||
<div class="summaryTableDescription"> | ||
|
||
Checks whether the array is empty.</div> | ||
</td><td class="summaryTableOwnerCol">Array</td> | ||
</tr> | ||
<tr class="hideInheritedMethod"> | ||
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"> | ||
<div class="summarySignature"> | ||
|
@@ -1259,6 +1279,61 @@ | |
</div> | ||
<p></p> | ||
</div> | ||
<a name="includes()"></a> | ||
<table cellspacing="0" cellpadding="0" class="detailHeader"> | ||
<tr> | ||
<td class="detailHeaderName">includes</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td> | ||
</tr> | ||
</table> | ||
<div class="detailBody"> | ||
<code><a href="statements.html#AS3">AS3</a> function includes(item:<a href="specialTypes.html#*">*</a>):<a href="Boolean.html">Boolean</a></code> | ||
<p></p> | ||
<table border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | ||
<td valign="top" style="white-space:nowrap"><b>Language version: </b></td><td>ActionScript 3.0 | ||
</td> | ||
</tr> | ||
</table> | ||
<table border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | ||
<td valign="top" style="white-space:nowrap"><b>Runtime version: </b></td><td>AIR 51.0 | ||
|
||
</td> | ||
</tr> | ||
</table> | ||
<p></p><p> | ||
|
||
Checks whether the array includes the item that is passed in. | ||
|
||
Each element is checked in turn to see if it matches the item that is passed in, | ||
|
||
using the standard comparison operator (i.e. similar to <code>if (array[0] == item)</code>). | ||
|
||
|
||
</p><span class="label">Parameters</span> | ||
<table border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | ||
<td width="20px"></td><td><code><span class="label">item</span>:<a href="specialTypes.html#*">*</a></code> — The item to be checked if it is in the array. | ||
|
||
|
||
</td> | ||
</tr> | ||
</table> | ||
<p></p> | ||
<span class="label">Returns</span> | ||
<table border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | ||
<td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> — | ||
True if the item is found in this array. | ||
|
||
|
||
|
||
|
||
|
||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
<a name="indexOf()"></a> | ||
<table cellspacing="0" cellpadding="0" class="detailHeader"> | ||
<tr> | ||
|
@@ -1396,6 +1471,50 @@ | |
</tr> | ||
</table> | ||
</div> | ||
<a name="isEmpty()"></a> | ||
<table cellspacing="0" cellpadding="0" class="detailHeader"> | ||
<tr> | ||
<td class="detailHeaderName">isEmpty</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule"> </td> | ||
</tr> | ||
</table> | ||
<div class="detailBody"> | ||
<code><a href="statements.html#AS3">AS3</a> function isEmpty():<a href="Boolean.html">Boolean</a></code> | ||
<p></p> | ||
<table border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | ||
<td valign="top" style="white-space:nowrap"><b>Language version: </b></td><td>ActionScript 3.0 | ||
</td> | ||
</tr> | ||
</table> | ||
<table border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | ||
<td valign="top" style="white-space:nowrap"><b>Runtime version: </b></td><td>AIR 51.0 | ||
|
||
</td> | ||
</tr> | ||
</table> | ||
<p></p><p> | ||
|
||
Checks whether the array is empty. | ||
|
||
An alternative to calling a comparison <code>array.length == 0</code>. | ||
|
||
|
||
</p><p></p> | ||
<span class="label">Returns</span> | ||
<table border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | ||
<td width="20"></td><td><code><a href="Boolean.html">Boolean</a></code> — | ||
True if the array has no elements. | ||
|
||
|
||
|
||
|
||
|
||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
<a name="join()"></a> | ||
<table cellspacing="0" cellpadding="0" class="detailHeader"> | ||
<tr> | ||
|
@@ -3513,11 +3632,11 @@ | |
<p></p> | ||
<div class="feedbackLink"> | ||
<center> | ||
<a href="mailto:[email protected]?subject=ASLR Feedback(Wed Sep 28 2022, 6:12 PM GMT+01:00) : Array">Submit Feedback</a> | ||
<a href="mailto:[email protected]?subject=ASLR Feedback(Mon Feb 12 2024, 3:03 PM GMT) : Array">Submit Feedback</a> | ||
</center> | ||
</div> | ||
<center class="copyright"> © 2004-2022 Adobe Systems Incorporated. All rights reserved. <br>Wed Sep 28 2022, 6:12 PM GMT+01:00<br> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> </center> | ||
<center class="copyright"> © 2004-2022 Adobe Systems Incorporated. All rights reserved. <br>Mon Feb 12 2024, 3:03 PM GMT<br> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> </center> | ||
</div> | ||
</body> | ||
</html> | ||
<!-- © 2004-2022 Adobe Systems Incorporated. All rights reserved. Wed Sep 28 2022, 6:12 PM GMT+01:00 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> --> | ||
<!-- © 2004-2022 Adobe Systems Incorporated. All rights reserved. Mon Feb 12 2024, 3:03 PM GMT <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<link rel="stylesheet" href="style.css" type="text/css" media="screen"> | ||
<link rel="stylesheet" href="print.css" type="text/css" media="print"> | ||
<meta content="Function,apply,call" name="keywords"> | ||
<meta content="Function,declaration,apply,call" name="keywords"> | ||
<title>Function (ActionScript 3.0)</title> | ||
<script type="text/javascript" src="AC_OETags.js"></script> | ||
</head> | ||
|
@@ -54,7 +54,9 @@ | |
</table> | ||
<table border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | ||
<td valign="top" style="white-space:nowrap"><b>Runtime version: </b></td><td></td> | ||
<td valign="top" style="white-space:nowrap"><b>Runtime version: </b></td><td>AIR 1.0 | ||
|
||
</td> | ||
</tr> | ||
</table> | ||
<p></p> | ||
|
@@ -88,7 +90,7 @@ | |
<a onclick="javascript:setInheritedVisible(true,'Property');" href="#propertySummary" class="showHideLink"><img alt="Show Inherited Public Properties" src="images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Properties</a> | ||
</div> | ||
</div> | ||
<table id="summaryTableProperty" class="summaryTable hideInheritedProperty" cellpadding="3" cellspacing="0"> | ||
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0"> | ||
<tr> | ||
<th> </th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined by</th> | ||
</tr> | ||
|
@@ -99,6 +101,13 @@ | |
A reference to the class object or constructor function for a given object instance.</div> | ||
</td><td class="summaryTableOwnerCol"><a href="Object.html">Object</a></td> | ||
</tr> | ||
<tr class=""> | ||
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"> </td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#declaration">declaration</a> : <a href="String.html">String</a> | ||
<div class="summaryTableDescription">[read-only] | ||
|
||
Returns a string representing the function declaration from the source code.</div> | ||
</td><td class="summaryTableOwnerCol">Function</td> | ||
</tr> | ||
<tr class="hideInheritedProperty"> | ||
<td class="summaryTablePaddingCol"> </td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="Object.html#prototype">prototype</a> : <a href="Object.html">Object</a> | ||
<div class="summaryTableDescription">[static] | ||
|
@@ -222,6 +231,28 @@ | |
showHideInherited(); | ||
--></script> | ||
<div class="MainContent"> | ||
<a name="propertyDetail"></a> | ||
<div class="detailSectionHeader">Property detail</div> | ||
<a name="declaration"></a> | ||
<table cellspacing="0" cellpadding="0" class="detailHeader"> | ||
<tr> | ||
<td class="detailHeaderName">declaration</td><td class="detailHeaderType">property</td> | ||
</tr> | ||
</table> | ||
<div class="detailBody"> | ||
<code>declaration:<a href="String.html">String</a></code> [read-only]<p> | ||
|
||
Returns a string representing the function declaration from the source code. | ||
|
||
</p><p>This can be used to find out naming and parameter details, and also determine what kind of function | ||
|
||
the object is (anonymous function vs member fnction, etc).</p> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Small typo here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good spot, thanks! |
||
|
||
<span class="label">Implementation</span> | ||
<br> | ||
<code> <a href="statements.html#AS3">AS3</a> function get declaration():<a href="String.html">String</a></code> | ||
<br> | ||
</div> | ||
<a name="methodDetail"></a> | ||
<div class="detailSectionHeader">Method detail</div> | ||
<a name="apply()"></a> | ||
|
@@ -243,7 +274,9 @@ | |
</table> | ||
<table border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | ||
<td valign="top" style="white-space:nowrap"><b>Runtime version: </b></td><td></td> | ||
<td valign="top" style="white-space:nowrap"><b>Runtime version: </b></td><td>AIR 1.0 | ||
|
||
</td> | ||
</tr> | ||
</table> | ||
<p></p><p> | ||
|
@@ -320,7 +353,9 @@ | |
</table> | ||
<table border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | ||
<td valign="top" style="white-space:nowrap"><b>Runtime version: </b></td><td></td> | ||
<td valign="top" style="white-space:nowrap"><b>Runtime version: </b></td><td>AIR 1.0 | ||
|
||
</td> | ||
</tr> | ||
</table> | ||
<p></p><p> | ||
|
@@ -539,11 +574,11 @@ | |
<p></p> | ||
<div class="feedbackLink"> | ||
<center> | ||
<a href="mailto:[email protected]?subject=ASLR Feedback(Wed Sep 28 2022, 6:12 PM GMT+01:00) : Function">Submit Feedback</a> | ||
<a href="mailto:[email protected]?subject=ASLR Feedback(Mon Feb 19 2024, 3:46 PM GMT) : Function">Submit Feedback</a> | ||
</center> | ||
</div> | ||
<center class="copyright"> © 2004-2022 Adobe Systems Incorporated. All rights reserved. <br>Wed Sep 28 2022, 6:12 PM GMT+01:00<br> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> </center> | ||
<center class="copyright"> © 2004-2022 Adobe Systems Incorporated. All rights reserved. <br>Mon Feb 19 2024, 3:46 PM GMT<br> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> </center> | ||
</div> | ||
</body> | ||
</html> | ||
<!-- © 2004-2022 Adobe Systems Incorporated. All rights reserved. Wed Sep 28 2022, 6:12 PM GMT+01:00 <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> --> | ||
<!-- © 2004-2022 Adobe Systems Incorporated. All rights reserved. Mon Feb 19 2024, 3:46 PM GMT <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/3.0/80x15.png" /></a> --> |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be better
array[i]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't more like
<code>if (array.indexOf(item) != -1)</code>
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or simply
array.indexOf(item) != -1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it isn't (having just checked the implementation!). In
includes
we are using the normal comparison operator, so basically iterating through and usingarray[i] == item
. But theindexOf
function uses the strict equality operator, so would be more like usingarray[i] === item
.That potentially raises the question whether the implementation of
includes
is correct i.e. which would actually be more useful! So e.g. for:we would have
because the normal equality operator tries to convert/promote primitive types to match each other, so this would essentially do
s === String(i)