-
Notifications
You must be signed in to change notification settings - Fork 0
API Cheat Sheet [solution5]
Note: This is the module for testing.
For using solution5
module, let's import this module like as following line.
import {solution5} from '@bapquad/element5'
Sets the action occurs when the DOM element has been added or removed.
Parameter
-
element:DOM
- The dom element. Required -
addCallback:function
- The event handle occurs when DOM added into document. Required -
removeCallback:function
- The event handle occurs when DOM removed into document. Optional
Return
Returns the void value.
Example
import {element5 as $, solution5} from '@bapquad/element5'
let formEL = $("#formID");
solution5.SetMutationEvent(formEL, function(e)
{
console.log(e);
});
Request a worker.
Parameter
-
path:string
- The string presents a worker script path. Required -
msgHandle:function
- The message event handle. Optional
Return
Returns the worker instance object.
Example
import {solution5} from '@bapquad/element5'
let worker = solution5.RequestWorker("/js/worker.js", function(e)
{
console.log(e);
});
// print the worker object
console.log(worker);
Request a worker.
Parameter
-
path:string
- The string presents a worker script path. Required -
msgHandle:function
- The message event handle. Optional
Return
Returns the worker instance object.
Example
import {solution5} from '@bapquad/element5'
let thread = solution5.OutThread("/js/worker.js", function(e)
{
console.log(e);
});
// print the thread
console.log(thread);
Request a response server event.
Parameter
-
path:string
- The string presents a worker script path. Required -
msgHandle:function
- The message event handle. Optional
Return
Returns the worker instance object.
Example
import {solution5} from '@bapquad/element5'
let response = solution5.ServerSentEvent("/js/worker.js", function(e)
{
console.log(e);
});
// print the response
console.log(response);
Request a response server event.
Parameter
-
path:string
- The string presents a worker script path. Required -
msgHandle:function
- The message event handle. Optional
Return
Returns the worker instance object.
Example
import {solution5} from '@bapquad/element5'
let response = solution5.ServerMessage("/js/worker.js", function(e)
{
console.log(e);
});
// print the response
console.log(response);
Turns on the document in the Debug mode.
Parameter
-
mode:string
- The mode of debug. Required
Return
Returns the void value.
Example
import {solution5} from '@bapquad/element5'
solution5.Debug("ON");
When turns on the document in the Debug mode use only.
Parameter
-
message:string
- The error message would be written. Required
Return
Returns the void value.
Example
import {solution5} from '@bapquad/element5'
solution5.Debug("ON");
solution5.WriteError("This is error message.");
When turns on the document in the Debug mode use only.
Parameter
-
message:string
- The alerted message. Required
Return
Returns the void value.
Example
import {solution5} from '@bapquad/element5'
solution5.Debug("ON");
solution5.WriteAlert("This is test message.");
Make the body element enter to fullscreen mode.
Parameter
- Has no parameter.
Return
Returns the solution5
object.
Example
import {solution5} from '@bapquad/element5'
solution5.EnterFullscreen();
Make the body element exit from fullscreen mode.
Parameter
- Has no parameter.
Return
Returns the solution5
object.
Example
import {solution5} from '@bapquad/element5'
solution5.EscapeFullscreen();
Make the body element enter to or exit from fullscreen mode.
Parameter
- Has no parameter.
Return
Returns the solution5
object.
Example
import {solution5} from '@bapquad/element5'
solution5.ToggleFullscreen();
Bapquad Games since 2015
- Get Started
- Working with DOM
- Constructing the StyleSheet
- Working with Sprite
- Working with Timeline
- Working with Scroller
- Working with Camera
- Working with Microphone
- Making the Ajax Request
- Opening a Websocket
- Working with Storage
- Checking User Agent
- Working with GPS
- Working with Router
- Playing the Stream