This example demonstrates how to use content creation rules to specify the behavior for new windows created using the web native window.open
call.
Below is the content creation rule set defined in the platform manifest "platform.defaultViewOptions"
object.
"contentCreation": {
"rules": [
{
"behavior": "view",
"match": ["*://cdn.openfin.co/*"]
},
{
"behavior": "view",
"match": ["*://*.google.com/*"]
}
]
}
In the client/src/default-window.ts
the child-view-created
and view-child-view-created
events we create the view from the window.open
call invoked in client/src/app.ts
.
Follow the instructions below to get up and running.
-
Install dependencies and do the initial build. Note that these examples assume you are in the sub-directory for the example.
npm run setup
-
Build the project.
npm run build
-
Start the test server in a new window.
npm run start
-
Start the Platform application.
npm run client
This is an example of how to use OpenFin APIs to configure OpenFin Container. Its purpose is to provide an example and suggestions. DO NOT assume that it contains production-ready code. Please use this as a guide and provide feedback. Thanks!