1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-10-30 23:37:40 +02:00

Feature/#33 wait class function (#63)

* #33 Lib cleanup. Added WAIT_CLASS and WAIT_CLASS_ALL functions

* #33 Fixed attr update

* #33 HTMLElement.WaitForClass

* #33 Updated HTMLDocument.WaitForClass
This commit is contained in:
Tim Voronov
2018-10-06 22:33:39 -04:00
committed by GitHub
parent 79b8171fd8
commit e64ad4ec0e
48 changed files with 1193 additions and 670 deletions

View File

@@ -10,7 +10,7 @@ import (
* Appends a new item to an array and returns a new array with a given element.
* If ``uniqueOnly`` is set to true, then will add the item only if it's unique.
* @param arr (Array) - Target array.
* @param item (Value) - Target value to add.
* @param item (Read) - Target value to add.
* @returns arr (Array) - New array.
*/
func Append(_ context.Context, args ...core.Value) (core.Value, error) {

View File

@@ -9,7 +9,7 @@ import (
/*
* Returns a first element from a given array.
* @param arr (Array) - Target array.
* @returns element (Value) - First element in a given array.
* @returns element (Read) - First element in a given array.
*/
func First(_ context.Context, args ...core.Value) (core.Value, error) {
err := core.ValidateArgs(args, 1, 1)

View File

@@ -9,7 +9,7 @@ import (
/*
* Returns the last element of an array.
* @param array (Array) - The target array.
* @returns (Value) - Last element of an array.
* @returns (Read) - Last element of an array.
*/
func Last(_ context.Context, args ...core.Value) (core.Value, error) {
err := core.ValidateArgs(args, 1, 1)

View File

@@ -11,7 +11,7 @@ import (
* It is the same as anyArray[position] for positive positions, but does not support negative positions.
* @param array (Array) - An array with elements of arbitrary type.
* @param index (Int) - Position of desired element in array, positions start at 0.
* @returns (Value) - The array element at the given position.
* @returns (Read) - The array element at the given position.
* If position is negative or beyond the upper bound of the array, then NONE will be returned.
*/
func Nth(_ context.Context, args ...core.Value) (core.Value, error) {

View File

@@ -9,8 +9,8 @@ import (
/*
* Returns a value indicating whether an element is contained in array. Optionally returns its position.
* @param array (Array) - The source array.
* @param value (Value) - The target value.
* @param returnIndex (Boolean, optional) - Value which indicates whether to return item's position.
* @param value (Read) - The target value.
* @param returnIndex (Boolean, optional) - Read which indicates whether to return item's position.
*/
func Position(_ context.Context, args ...core.Value) (core.Value, error) {
err := core.ValidateArgs(args, 2, 3)

View File

@@ -9,8 +9,8 @@ import (
/*
* Create a new array with appended value.
* @param array (Array) - Source array.
* @param value (Value) - Target value.
* @param unique (Boolean, optional) - Value indicating whether to do uniqueness check.
* @param value (Read) - Target value.
* @param unique (Boolean, optional) - Read indicating whether to do uniqueness check.
* @returns (Array) - A new array with appended value.
*/
func Push(_ context.Context, args ...core.Value) (core.Value, error) {

View File

@@ -10,7 +10,7 @@ import (
* Returns a new array with removed all occurrences of value in a given array.
* Optionally with a limit to the number of removals.
* @param array (Array) - Source array.
* @param value (Value) - Target value.
* @param value (Read) - Target value.
* @param limit (Int, optional) - A limit to the number of removals.
* @returns (Array) - A new array with removed all occurrences of value in a given array.
*/

View File

@@ -10,7 +10,7 @@ import (
* Returns a new sliced array.
* @param array (Array) - Source array.
* @param start (Int) - Start position of extraction.
* @param length (Int, optional) - Value indicating how many elements to extract.
* @param length (Int, optional) - Read indicating how many elements to extract.
* @returns (Array) - Sliced array.
*/
func Slice(_ context.Context, args ...core.Value) (core.Value, error) {

View File

@@ -9,7 +9,7 @@ import (
/*
* Prepends value to a given array.
* @param array (Array) - Target array.
* @param value (Value) - Target value to prepend.
* @param value (Read) - Target value to prepend.
* @param unique (Boolean, optional) - Optional value indicating whether a value must be unique to be prepended.
* Default is false.
* @returns (Array) - New array with prepended value.